Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 22 Next »

  • 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 Model:

      • The multi-record model is used when multiple records need to be displayed at a time

Model Creation

  • Create a MultiRecord model

    • Go to the Model tab

    • Click on the + icon

    • Enter information, click Save

  • Click Details tab

  1. Label: Label is used to identify the model at the UI

  2. Name: Name is the unique identifier of the model

  3. Type: The type field indicates the type of model you create

    1. There are five types that are Record, API, Aggregate, and Item

    2. Select the type from the dropdown menu

  4. Record Count: Record count indicate which record should be created

    1. There are two types of records, Single record, and Multirecord

    2. Select the record count from the dropdown menu

  5. Is Shared?:

  6. Object Def: You can link the object with the model

    1. The complete list of objects in your instance is displayed

    2. Select the object from the dropdown menu

  7. 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

    1. e.g. Set Offset: 0, then the query will take the record 1 onwards

  8. Limit: Set the limit for how many records you want to display at a time

  9. Order By: You can set the order by on the fields to records to be queried and displayed in the Model

    1. Click on the + icon

    2. Fill in the information, click Save

  1. Field name: All field names will display that which is present in the object

    1. Select the field name from the dropdown menu

  2. Sort As: Arranging the data in a particular format

    1. There are two types of sorting

      1. Ascending: Elements are arranged from lowest to the highest value

      2. Descending: Elements are arranged from highest to the lowest value

    2. 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 New button

      • Enter Label & Name, click on the Config icon

      • Enter information, click Save

  1. Field Source:

    1. Select the field source from the dropdown menu

      1. Field: The object that adds to the model, those fields are displayed in the field attribute

        1. Select the fields from the dropdown menu

      2. Variable: Variables are containers for storing data values in PWR Apps

        1. There are different types of variables such as Integer, Double, Date, Time, etc

        2. Select the variable from the dropdown menu

      3. Model: The model you created will be displayed

        1. Select the model from the dropdown menu

      4. Static: You can enter any (hardcoded) value

        1. e.g. Static: Test

      5. Cookie: A cookie is a piece of data, that is stored within a web browser

        1. If you have stored some value in cookies like sid, so you can get it from cookies

          1. e.g. Cookie: Name - Record, Value - 12345

      6. LocalStorage: Local storage is a piece of data, that is stored within a web browser

        1. If you have stored some value in local storage like data, so you can get it from storage

          1. e. g. LocalStorage: Key - collapsedid_16599648011147719 , Value - true

      7. QueryParam: Query parameters are a defined set of parameters attached to the end of a URL

        1. e.g. QueryParam: www.test.com?Name

      8. User: The fields that are present in a user's profile that will be displayed

        1. Select the field from the dropdown menu such as First Name, Last Name, Name, Phone, Email, Is Active, Id, Session Id

  2. Merge Field Expression: A field is formed during the expression and many expressions are created by using a merge field

    1. An expression is added to the message body by clicking the + icon

  3. Message Body: In the merge, field expression will be displayed in the message body

  • Click the Criteria tab

  • Click on the Filter + icon

    • Filter: Filter criteria allow you to compare records from one object to records from another

  1. Field Name: Names of fields that are present in the object

    1. You can add criteria to that field

    2. select the field name from the dropdown menu

  2. Operator: The operator is a character that represents a specific mathematical or logical action

    1. Select the operator from the dropdown menu

      1. Equals: Used to compare two values

      2. NotEquals: Checks whether two values are not equal

      3. Start with: Checks any string that starts with

      4. Contains: Indicates a search for any of the specified words within a particular attribute

      5. EndsWith: String ends with the specified value

      6. In: Allows you to easily test if an expression matches any value in a list of values

  3. Source Type:

    1. Select the source type from the dropdown menu

    2. Such as Field, Variable, Model, Static, Cookie, LocalStorage, QueryParam, User

  4. Variables:

    1. Select the variables from the dropdown menu, e.g. Record Id

  • Click Save

  • Return to the layout page

  • A Model is created

Model Addition

  • Select a Multi Record Model

    • In the basic config, Click + icon

    • Add the Model and click Save

  • For a Single record Model, the same procedure is used.

Context Models

  • A Context model is created by using a multi-record model

  • It acts as a single record model

Models Creation

  • Click on the + icon

  • Create Models and click Save

Criteria

  • Criteria determine the conditions under which the criteria apply

  • When the given criteria in the form are completed, then the criteria are fired

  • Using source types, you can add criteria in the form

Source Type

  • On which destination do you won't compare your criteria

  • There are multiple source types available

    • Static:

    • Input:

    • Variable:

      • Click + icon

      • Create Variable, click Save

        • Label:

        • Name:

        • Field Type:

        • Required:

        • Is Array:

        • Default Value:

        • Variable Scope:

    • Cookie:

    • Context:

  • Create Criteria

    • Click on the + icon

    • Add Criteria, click Save

  • No labels