Models are used to display content in the layout
Typically used for record creation or editing, as well as various types of messaging
A Model needs to be added when you perform any action in an event
There are 2 types of Model
Single Record Model:
The single record model is generally used when only a single record needs to be displayed at a time
Multirecord Multi record Model:
The multi-record model is used when multiple records need to be displayed at a time
...
Create a Multirecord model
Go to the Modeltab
Click on the + icon
Enter information, click Save
...
Click Details tab
Label: Label is used to identify the model at the UI
Name: Name is the unique identifier of the model
Type: Display the model's type
There are five types that are Record, API, Aggregate, and Item
Select the type from the dropdown menu
Record Count: Record count indicate which record should be created
There are two types of records, Single record, and Multirecord
Select the record count from the dropdown menu
Is Shared?:
Object Def: You can bind the object with the model
The complete list of objects in your instance is displayed
Select the object from the dropdown menu
Offset: You can set the offset for the query on the object. If the offset is ānā then the query will take the records ān+1ā onwards
e.g. Set Offset: 0, then the query will take the record 1 onwards
Limit: Set the limit for how many records you want to display at a time
Order By: You can set the order by on the fields to records to be queried and displayed in the Model
Click on the + icon
Fill in the information, click Save
Field name: All field names will display that which is present in the object
Select the field name from the dropdown menu
Sort As: Arranging the data in a particular format
There are two types of sorting
Ascending: Elements are arranged from lowest to the highest value
Descending: Elements are arranged from highest to the lowest value
Select the option from the dropdown menu
Click Fields tab
Select the field. These fields are added to the selected fields
These selected fields are added to the model
Click the UI Fields tab
Click Newbutton
Enter Label & Name, click
Click on the Config icon
Enter information, click Save
Field Source:
Select the field source from the dropdown menu
Field: The object that adds to the model, those fields are displayed in the field attribute
Select the fields from the dropdown menu
Variable: Variables are containers for storing data values in PWR Apps
There are different types of variables such as Integer, Double, Date, Time, etc.
Select the variable from the dropdown menu
Model: The model you created will be displayed
Select the model from the dropdown menu
Static: You can enter any (hardcoded) value
e.g. Static: Test
Cookie: A cookie is a piece of data, that is stored within a web browser
If you have stored some value in cookies like SID, so you can get it from cookies
e.g. Cookie: Name - Record, Value - 12345
LocalStorage: Local storage is a piece of data, that is stored within a web browser
If you have stored some value in local storage like data, so you can get it from storage
e. g. LocalStorage: Key - isAdmin, Value - true
QueryParam: Query parameters are a defined set of parameters attached to the end of a URL
e.g. QueryParam: www.test.com?Name
User: The fields that are present in a user's profile that will be displayed
Select the field from the dropdown menu such as First Name, Last Name, Name, Phone, Email, Is Active, Id, Session Id
Merge Field Expression: A field is formed during the expression and many expressions are created by using a merge field
An expression is added to the message body by clicking the + icon
Message Body: In the merge, field expression will be displayed in the message body
...
A Context model is created by using a multi-record modelIt acts as a single record model
Models Creation
...