In this tutorial you will learn how to use table row binding.
Let's start with creating a new list - 'PRODUCTS'. It will be a list of products regularly bought by some company. If you do not want to create your own list you can copy the one from the table below. Remember to save list after filling it.
|paper towel||6||for kitchen use|
|case of milk||10||food|
|pack of water||5||food|
|sugar 1 kg||3||food|
|marker- 3 colors||9||office supplies|
|washing-up liquid||8||for kitchen use|
|pack of batteries||11||other|
|liquid soap||7||for kitchen use|
2.Binding with the list
Create a new app - 'PRODUCTS_COSTS'. Add a table widget and bind it and its columns with the list. Set type of colums A and C as 'Text', and column B as 'Currency'.
We would want to be able to add number and calculate price for that number of products. Add two columns with type: number and currency. The 'number' column set as editable.
Change headers to: product name, price, category, number (x) and price for x products. In the last column put a formula that will calculate the price for a chosen amount of products:
Now see what our app does by clicking 'preview'.
The table shows all products from the list. Of course we could view products of only certain category or price by using the lookup formula in 'Filter' field.
But what if we wanted to view different products that don't have anything in common?
It is possible if we use row binding.
You need to delete binding between table section and list. It means you need to delete LookUp formula from 'Filter' field in Options tab of the table.
What you need to do is to undo the table- list binding. It means deleting the lookup formula from 'filter' field.
Next you need to drag the 'name' list field to the first table column. This way all rows in this column will have a dropdown with product names.
Now we want for to price and category to appear automatically after choosing a product from the dropdown.
Then choose option 'allow add rows' and in 'new row formula' put this formula:
Now add yourself as the app creator and run it or check how it works using the 'preview' button.