user
You may often want to associate things with the current enrolled user in your app. For this purpose, JourneyApps provides a global user
variable that you can access from any view's JavaScript/TypeScript.
For example, let's say we want to associate objects that a user creates in the mobile app with that particular user. If we have a form
object that belongs to the user
as shown below in our Data Model:
schema.xml
...then we can associate a new form (that we create in the init()
function in one of our views) with the current user as follows, making use of the global user
object:
Last updated