Integration between different Google Appmaker Apps

后端 未结 1 1208
旧巷少年郎
旧巷少年郎 2020-12-18 15:51

I\'d like to be able to switch between 2 different apps (app1 and app2) using and transition animation. Ideally with the following capabilities 1) App2 is able to recognize

相关标签:
1条回答
  • 2020-12-18 16:23

    Unfortunately, no magic for this case. To implement this scenario you need to:

    1 Create separate model (AppSettings for example) in both apps and store there App1Url and App2Url correspondingly for each app.

    2 To navigate user from App1 to App2 you can use this binding for Link widgets:

    @datasources.AppSettings.item.App2Url + '?paramName=paramValue' + '#PageName'
    

    3 In the onAttach event of the 'PageName' page invoke function like this

    function loadPageName() {
      google.script.url.getLocation(function(location) {
         var paramName = location.parameter.paramName;
         var datasource = app.datasources.SomeDatasource;
    
         datasource.filters.SomeField._equals = paramName;
         datasource.load();
      });
    }
    

    Please, keep in mind, that to avoid double datasource loading you need to switch it to manual loading mode.

    This scenario will cause full page reload.

    0 讨论(0)
提交回复
热议问题