Hosted HTML as first page anonymous access with query string


#1

We have an anonymous app the first page needs to do a db lookup based on the URL and query string used to access the page. Can’t find any docs on how to do this. Can someone point me in the right direction.


#2

So, first whitelist the parameter for the page, let’s say name. Select the page, click Define Variables in the right-hand menu and add the parameter.

If it’s an AppGyver DB resource, you need to pass in a stringified query object. You can do that by defining a storage variable that will store the query, e.g. queryObj. Then, in the page load logic flow, you can get the parameter and store it into the query object in a function node:

var queryObj = {
    name: parameter.name
}

storage.set("queryObj", JSON.stringify(queryObj));

Then, in the data tab, add a new query parameter called query and bind the storage.queryObj variable to it.

This will become significantly simpler in an upcoming release, but the above should work.