5. Create a table grid with a dynamic list of products
Let's create a grid and name it Shopping list.
Then add the following columns:
Product: Asingle-select list column with dynamic options populated with the Driving Table Products. A query to get a list of products and prices from the Driving Table.
SELECT Name, Price FROM Products
To display the price automatically, use the dynamic option mapping. You need to map the option label to display the product name and the option value to display the price.
Price: The formula column helps to display the product price per item. You need to get the price column from the Driving Table together with the product name. Check the query used in the previous step.
Quantity: The integer column to specify the number of items for the purchase.
Total: The formula column that calculates the total price for a specific item. It also calculates the total sum of the whole order.
Formula to retrieve product price automatically
You can select the product from the dynamic list which is configured as a Driving Table.
The total quote for each product is calculated automatically using the formula column.
You can update the list of products and change prices in the stand-alone table used to store product-related information. This does not require changing your grid configuration.