TABLE OF CONTENTS
The Table and Form Components offer efficient ways to map data source fields directly onto interface fields. For example, if you have an external API that provides your app with 10 fields, you can easily display them on the interface by setting the Data Path in the Form Component. You can then use the Component to reorder, toggle visibility, and rename fields (to learn more about formatting data, check the Formatting Data article).
In traditional applications, mapping API field names to interface components requires careful management. However, with App Studio, if the underlying API changes, the component automatically detects new fields, allowing you to add them without the need for manual mapping or removal from the interface.
In App Studio, both Table and Form Components automatically interpret data sources, providing you with the fields to manage.
Using the Form and Table Components
This example demonstrates how to use the Form and Table Components to create an app where users can search for spacecraft, view search results, and select a record to view more details.
The setup requires the following three Components:
- A Form Component that allows users to input search values and submit them to a search data set.
- A Table Component that displays the search results. Users can select a record from this table to view more details.
- A Read-Only Form Component that shows detailed information about the selected record, providing a read-only view of the record's details.
Adding a Form Component to Input Search Values
- Click Components on the Explorer and Components panel.
- Under Data, select the Form component and drag it onto the canvas.
- Click on the new Form component (either in the Explorer menu or in the Canvas).
- Update the name of the newly added component.
- In the Appearance and Configuration section, click Configuration.
- In the list of configurations, locate the Data set drop-down list and select the required data set to wire the component to the data set. The form will pull in the URL parameter that will be used to do the search automatically.
- Set the Search form toggle to ON (Toggle to blue).
Adding a Table Component to Display Search Results
- Select the Table component under the Data category and drag it onto the canvas.
- Click on the new Table component.
- Update the name of the newly added component.
- In the Appearance and Configuration section, click Configuration.
- Set the Read only toggle to ON (Toggle to blue).
- In the list of configurations, locate the Data set drop-down list and select the required data set to wire the component to the data set.
- Optionally, specify the Data path, that is a child object from the Data Set output to display on the table. If not specified, the top level parent is used.
Note: The data you see in the table in App Studio is 'mock' data and not fetched from the actual endpoint. You will see the real data when we move on to making a query.
Adding Read-Only Form Component to Show Detailed Information
- Repeat Steps 1-6 of the Adding a Form Component to Input Search Values instruction.
- In the list of configurations, locate the Read only toggle and set it to ON (Toggle to blue).
Preview
The image below has the Search Form Component (1) where the input value is entered, a Table (2) that displays search results, and the read-only Form component (3) that displays the Agency details for the selected spacecraft record.
Table Component Configuration
The table below provides descriptions of each configuration option available for the Table component under Appearance and Configuration > Configuration.
Configuration | Description |
Show record index | Adds an additional column that automatically increments from 1 onwards. |
Read only | Prevents users from setting values in the table cells. |
Show selection column | Adds a column with a checkbox for users to select rows. |
Expandable | Makes the table row expandable, revealing additional detailed information within the table. |
Pagination | Enables pagination, breaking large sets of data into pages. |
Line wrap | Wraps long text within a table cell onto multiple lines for better readability. |
Selection | Allows App users to select rows in the table. |
Empty message | A message that displays if there is no data to display in the table. |
Error message | A message that displays if the Data Set, typically an External Data Source, errors. |
Data set | Specifies the Data Set that the table pulls data from. |
Data path | Specifies an array of objects from the Data Set output to display in the table. |
Show header | Displays the header for each column in the table. |
Keep header in view | Maintains the header in view as the user scrolls through the table rows. |
Show field type icon | Displays an appropriate icon in the column header of each row. |
Fields | Adds new fields to the table. |
Tooltip text | Displays a tooltip with the specified information when users hover over the table. |
Event handlers | Adds an event handler. For details on event handlers, see: Adding event handlers. |
Form Component Configuration
The table below provides descriptions of each configuration option available for the Form component under Appearance and Configuration > Configuration.
Configuration | Description |
Layout | Selects a suitable layout for the Form to use to display fields. |
Label position | Places the field label relative to the field. |
Read only | If disabled, allows users to enter and edit values in the form fields. When enabled, displays form fields as read-only. |
Search form | Turns the form into a search form allowing users to input search criteria. |
Publish live dataset | If disabled, form data is available to App Studio as a dataset only after submission; if enabled, data updates in real-time as the user enters information, making it immediately available for other components and datasets. |
Submit on value change | If enabled, automatically evaluates the Data Set every time the App User updates a value. You use this if you need to capture User inputs without waiting for a form to Submit. |
Submit on Enter key | Submits the form when the user presses the Enter key. |
Highlight required fields | Marks mandatory fields visually, indicating that they must be completed before submission. |
Show primary button | Displays the main action button, such as "Save" or “Search” for form submission. |
Primary button text | Sets the text that appears on the primary App button. |
Enable primary button | Activates the primary button. |
Show secondary button | Displays a secondary action button. |
Secondary button text | Sets the text for the secondary action button. |
Enable secondary button | Activates an optional secondary button. |
Data set | Specifies the Data Set that the form pulls data from. |
Data path | Specifies an array of objects from the Data Set output to display in the table. |
Defaults data set | Specifies the dataset that contains predefined values that the form uses to retrieve data. |
Default attribute path | Specifies the specific path within the data set that the form uses to retrieve data. |
Fields | Adds a new field. |
Tooltip text | Displays a tooltip with the specified information when users hover over the table. |
Event handlers | Adds a new event handler. For details on event handlers, see: Adding event handlers. |
Form validation
| Configures form validation rules. For details on form validation Rules, see: Form validation Rules. |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article