Smart Data Component Form Design
This will be the last of our form design tutorials. We are going to add an online Inventory check for the equipment chosen. We will modify the Computer Inspection form and add a Smart Data Component to it. We will add an online check to the form so that when a button is clicked, we will fetch the inventory for the selected equipment and display it.
Form Design
Section titled “Form Design”- Login to Turbo Apps and click on Forms in the sidebar
- From the Forms list, click on the Inspection Form to display the form designer. Alternatively you can copy the Inspection Form and also make the changes below.
- From Turbo Premium, drag and drop
Smart Datato the form. Note that the position in the form does not matter as it will never be displayed to user.- Change the
Labelto Inventory Checker and click on the :fontawesome-solid-key: icon to update the API key - Click on teh API tab and confirm the API Property is set to
inspectionChecker - Now we need to create a new workflow to handle this Inventory check requirement. Click on the
+button next to the workflow dropdown. - Choose the
Smart Data Flowoption - Set the
Titleto Query Inventory andDescriptionas Queries the equipment inventory - Click on
Saveto create the flow - From the dropdown select the
Query Inventoryworkflow - Click on Save
- Change the
- From Layout, drag and drop
Columnsbelow the Equipment component- In Column Properties, confirm
Widthis 8 for each of the columns
- In Column Properties, confirm
- From Basic, drag and drop
Textfieldcomponent into the first column below theEquipmentcomponent- Change
Labelto Inventory and click the :fontawesome-solid-key: icon to set the API key - Scroll down and select the
Disabledfield as we do not want to allow the user to enter any data here - Click on API and confirm API name is
inventory - Click on Save
- Change
- From Basic, drag and drop
Buttoncomponent into the second column below theEquipmentcomponent (next to the Inventory component)- Change
Labelto Check Inventory and click the :fontawesome-solid-key: icon to set the API key - Change
Actionto Smart Data Component - Under the
Smart Data Componentselect the Inventory Checker that we just created above. We are instructing the form to invoke the Inventory CHecker SDC when the button is clicked. - You can also select the
Block Buttonoption if you want the button to span the width of the column - Click on Save
- Change
That’s it. We are now done with the Smart Data Form design.
Publish it
Section titled “Publish it”Click on Publish and enter a comment to identify the change and Publish it. We will connect this Smart Data to the Smart Data Flow to check Inventory when we develop the flow later.
Topics Covered
Section titled “Topics Covered”- Updating a form with a Smart Data Component
- Creating a Flow and attaching it to the Smart Data Component
- Adding a button to invoke the Smart Data Component on click