2

Hello i am new here so if i ask a stupid question please forgive me.

We at AppAtSchool are working with Google ApMaker and we want to call a published App with 2 parameters. How can we read those in App Maker? Thanks in advance!

  • You need to elaborate and provide more information on what exactly you want to achieve and have tried already but didn't work. – herrbischoff Jul 04 '17 at 20:01

3 Answers3

2

I'm guessing, that you are trying to read page URL parameters. In this case you can pass parameters like this:

https://script.google.com/<SomeMagic>/exec/?param1=value1&param2=value2#PageName

And then read them in page onAttach event(https://developers.google.com/appmaker/ui/logic#events):

google.script.url.getLocation(function(location) {
  var params = location.parameter;
  var param1 = params.param1;
  var param2 = params.param2;

  // Use parameters...
});

Maybe you also will need a way to genarate such links with parameters:

Integration between different Google Appmaker Apps

Pavel Shkleinik
  • 6,298
  • 2
  • 24
  • 36
1

you can call your application with url something like this: script.google.com/blablabla/#viewname/paramValue, and take param on client side and send it to server side.

Andrey Koltsov
  • 1,956
  • 6
  • 24
  • 43
0

If you pass parameters to your App Maker app through URL parameters, your app can read the parameters using the google.script.url.getLocation method:

google.script.url.getLocation(function(location) {
  console.log(location.parameters);
  console.log(location.hash);
});

Find more details in the documentation

Jason Liu
  • 186
  • 5