Input collection: myProducts19
Product | Average Sell Price |
Desktop Computer | 985.0301 |
Laptop | 1350.05 |
Monitor | 223.035 |
Printer | 100.987 |
Keyboard & Mouse | 40 |
Output collection: mySolution19 (2 decimal places)
Product | Average Sell Price |
Desktop Computer | 985.03 |
Laptop | 1350.05 |
Monitor | 223.04 |
Printer | 100.99 |
Keyboard & Mouse | 40 |
Solution code:
//Create a collection
ClearCollect(myProducts19,
{Product: "Desktop Computer", 'Average Sell Price': 985.03010},
{Product: "Laptop", 'Average Sell Price': 1350.05},
{Product: "Monitor", 'Average Sell Price': 223.0350},
{Product: "Printer", 'Average Sell Price': 100.987},
{Product: "Keyboard & Mouse", 'Average Sell Price': 40}
);
//Round the values in a column code
ClearCollect(mySolution19,myProducts19);
UpdateIf(mySolution19,true,{'Average Sell Price': Round('Average Sell Price',2)})