首页 文章

从API加载数据需要使用来自计算模型的参数

提问于
浏览
0

嗨我正在使用App Maker来构建将从Google Team Drive加载数据的应用程序 . 我能够从Team Drive API获取Team Drive ID并保存在计算模型中 .

然后我想创建另一个页面,它可以使用相同的方法在选定的团队驱动器中显示文件夹列表 . 但是,该功能需要传递驱动器ID . 我不知道如何将这两者连接在一起 .
enter image description here

1 回答

  • 1

    首先,您需要在Client Model的数据源中定义参数:

    enter image description here

    之后,您可以在客户端上访问它并将其绑定到某个小部件或通过脚本设置它:

    // binding
    @datasources.FolderList.query.parameters.DriveId
    
    // Client script
    app.datasources.FolderList.query.parameters.DriveId = 'some value';
    

相关问题