Add a Find Entity action

Use the Find Entity action to search for entity instances within a form based on the specified search criteria. You can search for:

  • Single entity instance: Returns the instance ID of the entity instance matching the search criteria. If multiple entity instances exist, the search returns the instance ID of the first available record in the database.

  • Multiple entity instances: Returns all entity instances matching the search criteria, along with their key fields and entity instance IDs.

For example, you can build a site to return the instance ID of a single entity instance. You can also set a flag to select which search criteria to use by mapping the entity attribute flag to a control (check box in this case).

Note When entering search criteria, ensure that you enter the entire keyword. Wildcard characters or partial keywords are not supported. Similarly, you can build a site to return multiple entity instances. The search returns all entity instances matching the search criteria, along with the key field and entity instance ID.

  1. On the Form Modeling bar, click Actions.
  2. On the Actions page, click Add Generic Add.
  3. On the Type list, select Find Entity Instance.
  4. Enter a Name and Description for the action.

  5. Optionally, configure a unique action for each language separately. See Configure multilingual actions for a form or control for more information.
  6. On the Entity list, consume the required entity definition.

    All the attributes of the selected entity are displayed in the table.

    Note This list is not available when you use this action in a Create Entity Instance form.
  7. Consume the required form field, form variable, or global variable in the Session ID box.
    Note To get a session ID, you must add a Logon form to the site. See Build a Logon form.
  8. Set Return Instance to single or multiple.
  9. Map attributes using dynamic or static values.
  10. For every key field in the entity, a flag is provided to specify whether the key field is used as search criteria at runtime. To specify a value for the flag, do either of the following:
    • Dynamic value: Consume the required form field to the relevant key field flag.

    • Static value: Click the Static static button next to Value box, and then enter the required value in the Value box.

  11. Click OK.

    The newly created action is added to the table.

  12. Click Save.
  13. Associate the action with the control to trigger this action. To call the Find Entity action upon form load, associate the action with the form. See Associate an action with a form or control.