Add or Update Function
  • 1 Minute to read
  • Contributors

    Add or Update Function


      Article Summary

      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:

      1. Go to the main dashboard and click on Admin Menu > Database > Data Tables.
      2. 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.
      3. You will land on the Data Table Functions page.
      4. Click +Add New Function.
      5. You will land on the Add Data Table Function page.
      6. Select the Add or Update radio button.
      7. Give a name to the function.
      8. Select the elements from the Add Elements drop-down to take the selected element as a reference to update the data.
      9. Select the Condition element which acts as reference elements.
      10. 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.
      11. 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.
      12. 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.
      13. 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.
      14. Click Submit to save the data function.





      Was this article helpful?