Multi-Select to fetch prices and apply them to a total.
Okay let me try and explain this the best I can. So currently i have a product table with all my products name and prices. I have also set up a Order form for when orders come in. On the orders form i have a multiselect box so i can select all the products the customer has ordered. Is it possible for when i select the products it pulls the prices and applies them to the total. Example if i select product 1 (£10) and product 5 (£2) from the multi select the total would be £12 on my order form etc.
I have something like this but i get an error and it wouldn't add the prices together anyway.
- for each name in input.Product_Select
- {
- if (Products[ID == input.Product_Select].count() > 0)
- {
-
- a = Products [ID == input.Product_Select];
- input.Sub_Total = a.Price;
- }
- }
Thanks in advanced.