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).
- On the Form Modeling bar, click Actions.
- On the Actions page, click Add .
- On the Type list, select Find Entity Instance.
-
Enter a
Name and
Description for the
action.
- Optionally, configure a unique action for each language separately. See Configure multilingual actions for a form or control for more information.
-
On the
Entity list,
consume the required entity definition.
All the attributes of the selected entity are displayed in the table.
This list is not available when you use this action in a Create Entity Instance form. -
Consume the required form field, form variable, or global
variable in the
Session ID box.
To get a session ID, you must add a Logon form to the site. See
- Set Return Instance to single or multiple.
- Map attributes using dynamic or static values.
-
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 button next to Value box, and then enter the required value in the Value box.
-
-
Click
OK.
The newly created action is added to the table.
- Click Save.
- 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.