You can use a URL variable to create a link to your app that automatically pulls data from a specific record in your database.
You have an app that pulls data out of your database. As usual, whenever you pull data out of your database you must build a mechanism in your app for determine which specific record to use in a single app session (i.e. which row to "look up"). The problem: You do not want the end-user to look up the specific record; you do not want to give the end-user a row selector question nor do you want to ask the end-user a question and then look up a record based on their response. Solution: Pass the value for looking up the specific record via a URL variable.
Here is a quick demo of what this looks like in practice:
Inside the app that you want to pull data into, create a text type URL variable. You do this under Settings > Global configuration:
URL variables do not have values until you pass in a value via the app's URL (we'll get to this soon). Ultimately, your URL variable will have a value that is equal to the key from a record in your database (accordingly, I'm naming my URL variable `database_key`).
Use your new URL variable in an expression block that indexes into your app's data source:
Great! As of right now, you have variables in your app for every column in your data source table. So, you can use these variables to create document templates, etc.
However, if you run your app you will notice that no data is being pulled in. This is because your URL variable (`database_key` in my example image above) is undefined, and this is because we have not yet created the app that generates a URL that passes a value into the URL variable. Let's do that next.
The purpose of this app is pass a value to the URL variable of your original app. This app will be used by you.
In this new app, do the following:
Here is what my row selector question looks like:
In this new app, add a URL logic block.
URL logic blocks require a base URL:
Now we're going to add a param to this base URL. When you add a param, you give it a name and a value. For the name, use the exact same name as the URL variable you created in your original app. For the value, use the key from the record that the row selector question "looks up" (the same row selector question we made at Step 3 above).
Your URL param should look something like this:
You now have a URL for your original app that passes a value to that original app's URL variable. Your final step is to somehow use this new URL. One way to use this URL is simply to paste it onto a page block so that you, the app user, can copy it and send it to your end-user. For example, like this:
Now, when the end-user clicks on this URL they will land inside your original app with a value that automatically pulls a particular record out of that app's data source.
Go from idea to launch in weeks.View services