Set up UI-only reference fields

Use the steps below to set up UI-only reference fields in Nintex Apps with linked objects from Salesforce, Nintex Data, or any supported data sources.

Goal

  • Create a UI-only model with a UI-only reference field that lets users select a record.

  • Use the selected record to filter and display details from a linked data model, such as Salesforce, Nintex Data, or any supported data source.

Step 1: Create the UI-only model

  1. Click Models in the Elements panel.

  2. Click Add a model.

  3. Complete the following model properties:

    • Model Id: The unique name by which components refer to this model.

    • Model Description: A description of the model and the data it contains.

    • Connection: Select UI-only.

  4. Click OK.

  5. Under Data, click Create a UI-only field.

  6. Complete the field properties. For more information, see Create the UI-Only field.

  7. For Display type, select Reference from the dropdown.

  8. In the Reference setup, complete the following properties:

    • Connector: Select a connector from the dropdown. For more information, see Connectors.

    • Connection: Select a connection from the dropdown. For more information, see Connections.

    • Object: Select the object you want to reference.

    • Related entity: key field: The name of the primary key or ID field in the related object that will be used as the key to link the data.

    • Relationship field name: The name of the UI-only field to store related information about the referenced record. (Optional)

  9. Click Apply.

The following sample names apply to steps 1 through 3:

  • UI-only model: UiOnlyModel

  • UI-only reference field: SelectedRecord

In Step 2: Create the linked data model, the SelectedRecord field from the UI-only model is used to filter the linked model.

Step 2: Create the linked data model

  1. Click Models in the Elements panel.

  2. Click .

  3. Complete the following model properties:

  4. Click OK.

  5. Add the fields you want to display. For more information, see Add fields using the models list.

  6. To load data only when a record is selected at runtime, turn off the Query on page load toggle in the Properties. For more information, see Properties.

  7. Add a condition to filter the model using the selected record. For example:

    • Field: Id

    • Operator: =

    • Value: UiOnlyModel.SelectedRecord

    • Enclose in quotes: Yes

    • If no value: Deactivate model

    For more information, see Model Conditions.

Step 3: Add a model action to sync records

  1. Click Models in the Elements panel.

  2. Select the UI-only model added in Step 1: Create the UI-only model.

  3. Click Actions.

  4. Click Add action and configure a model action to update the details when the user selects a new record at runtime. For example:

    • Trigger: Row Updated

    • Field: SelectedRecord

    • Action Type: Requery Models

    • Models to Requery: LinkedModel

    For more information, see Model Actions.

  5. Click Apply.

This action keeps your linked model in sync when the selected record changes.

Step 4: Build the page with components

  1. Add a Form component. For more information, see Add components to the canvas.

  2. Set the Model property to the UI-only model from Step 1: Create the UI-only model. For more information, see Form.

  3. Click Add fields.

  4. Select the UI-only reference field from Step 1: Create the UI-only model. This gives the users a lookup at runtime to select a record.

  5. Add another Form or Table component.

  6. Set the component's Model property to the linked model from Step 2: Create the linked data model. This will display the details of the selected record from the lookup.

  7. Click Add fields.

  8. Add any display fields you want.

  9. Click Save.

Step 5: Test your page

  1. Click Preview. For more information, see Preview a page.

  2. Select a record using the lookup field. This loads the matching record into the linked model.

  3. Try changing the selection and the page should update automatically.

Summary

This tutorial helps you build a dynamic page where users can:

  • Select a record using a UI-only model.

  • Filter record details from a linked model.