apps
2023.10
true
Apps User Guide
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Nov 11, 2024

Displaying the value of an entity field in a label

To display values of fields from an entity within labels or other display controls in your app using VB expressions, follow these steps:

  1. Go to the app where you want to add this feature.
  2. Click Add any from the dropdown arrow next to Add control. Select Entity.
    Note: If you already have an entity added to your app, you can skip this step.
  3. Create a new AppVariable and assign the entity to it.
    • For holding a list of entity records, add an app variable of the type ListSource, then select your entity using the dropdown menu.

    • For retrieving a single entity record, add an app variable of the type <Entity>, where <Entity> is the name of your entity.

  4. In the MainPage, go to the Events section in the property panel. Add a Loaded rule.
  5. Add a Set Value rule.
  6. In the Item To Set field, select your AppVariable using the lookup panel.
  7. In the Value field, use the query builder to construct your query.
    Note:

    You can find more information on how to construct a query in the Query builder page.

    If you are assigning a value to an AppVariable of the type <Entity>, use the query builder to generate the expression. Replace any Fetch function with FetchOne instead.

  8. Add a Label control.
  9. In the Text field, add the following expression:
    • If the variable you created was of the type <Entity>, holding a single entity record, use variableName.ColumnName.
    • For a variable holding multiple entity records, use variableName.data(<Index>).ColumnName, where variableName is the name of your variable from which you want to retrieve data.

The app displays the value of an entity field at runtime.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.