Comment on page
Apps access and store data via data sources. Each app has access to some built-in data sources containing local variables and client information. You can also create your own data sources in order to create, read, update and delete objects in the database. Data sources are also used in services.
App variables contain both built-in and custom variables that are used to hold global app state.
Current user roles contains a list of the roles in your solution as boolean properties. If an active user has been assigned a particular role, the property will be true. If they are not a member, the property will be false. This can be used for example, to restrict visibility to parts of the UI based on role.
URL parameters stores the available query parameters in an app. URL parameters are variables that can be included in the apps URL, such as
search=appfarm. You can create logic to check for parameters and run actions based on the values. A common use case is to create a deep link to specific object.
Create deep links to an object
You have a view that displays event details and you want to load that view and display an event according to the ID specified in a URL parameter when the app is loaded.
Create a URL parameter
eventIDwith the Data Type set as a reference to an
Eventobject class. Run an action using the On App Load event handler to check for the presence of a value in this parameter (an event ID). If there is a value, select that event in the
Eventsdata source and navigate to the event details page.
You can then share a link to a specific event, such as https://thirty50.appfarm.app/events?eventID=63755d984575 and when a user clicks that link they will be taken directly to the details page for that event.
Good to know
The first URL parameter included in a URL must be preceded with a question mark (?).
If you have a URL with multiple URL parameters, each parameter is joined with an ampersand (&).
For example, if an end-user has navigated to https://thirty50.appfarm.app/events/my-events, the value of
URL Path.Viewwould be