...
- Create a Product column that will display our products. The column will have these option attributes:
- label, default attribute, that will show the names of our products.
- price, that will store info about the price of our products.
- currency, which will store info about our product currency.
Tip Check the following articles for more information:
- Add options with products for the Product column. We will enter option attributes we set up earlier, such as price and currency.
- Save the column.
- Create an Amount column, that will display the amount of products we want to order. It will have a Number column type.
Now, let's create three formula columns:
- Price — the price of our product.
- Total price — the total price of our products.
- Currency — the currency of our order.
Tip For more information, check out Formulas in a grid.
Each column will have a different formula:
The Price column will reuse the data from the
price
option attribute from the Product column. To do so, we will input the following formula:Code Block language js theme FadeToGrey return $(product).price
Formula parameters:
product
— The Identifier of the Product column.price
— Key of the Price option attribute.The Total price column will multiply the data from the
price
option attribute by the data from the Amount column. To do this, we will use the formula:Code Block language js theme FadeToGrey return $(price) * return $(amount)
price
— Identifier of the Price column.amount
— Identifier of the Amount column.The Currency column will display the data from the
currency
option attribute from the Product column. We will use the following formula to do this:Code Block language js theme FadeToGrey return $(product).currency
Formula parameters:
product
— Identifier of the Product column.price
— Key of the Price option attribute.
...