Article summary
Did you find this summary helpful?
Thank you for your feedback
The Add or Update function allows the data table to capture new data when it is entered into the app or update data that is already present in the data table by using a data value as a reference that is already present in the data table records.
Here's a step-by-step guide to creating an Add or Update function:
- Go to the main dashboard and click on Admin Menu > Database > Data Tables.
- You will land on the Data Tables List page. Choose a data table for which you want to create a data table function and click Manage Functions corresponding to that particular data table.
- You will land on the Data Table Functions page.
- Click +Add New Function.
- You will land on the Add Data Table Function page.
- Select the Add or Update radio button.
- Give a name to the function.
- Select the elements from the Add Elements drop-down to take the selected element as a reference to update the data.
- Select the Condition element which acts as reference elements.
- You will see the Mapping and Condition fields displayed. These fields are used to map and set the condition for the input element/mapped element, respectively.
- Click on the Mapping drop-down, and it will show two values: Mapped and Static. You can map the element to a condition, or you can set a static value to the element field that needs to be displayed.
- Click on the Condition drop-down, and it will show you the following values:
- Contains: If the element field contains a value, then the condition becomes true.
- Not Contains: If the element field does not contain any value, then the condition becomes true.
- Empty: If the element field is empty, then the condition becomes true.
- Not Empty: If the element field has any value entered in it, then the condition becomes true.
- Equal: If the element field value is equal to the selected field value, then the condition becomes true.
- Not Equal: If the element field value does not equal to the selected field value, then the condition becomes true.
- Starts With: If the element field value starts with the selected field value, then the condition becomes true.
- Ends With: If the element field value ends with the selected field value, then the condition becomes True.
- Select the Update Elements which will get updated when the condition is satisfied, and set the Type as Replace for the elements which need to be updated in the data table.
- Click Submit to save the data function.
Was this article helpful?