Hi everyone,
Lets get straight to it
I would like to sum the quantities of added products to an invoice of the same ID in the portal
To make it more clear, so it would be like Sum( Invoice::Product_Qty ) .. This way it will sum all products with different IDs but my goal is to sum the product quantities based on their unique product IDs
Maybe i should use ExecuteSql? If it is the only way then how?
At the end thank you so much for any help you provide, i do really appreciate the little
Actually, you can prevent selecting the same product twice even when selecting directly in the portal row as there is a validation calculation that can be set up to catch those. or the product value list can "dwindle" to drop out previously selected products.
Like beverly, I don't know whether you want to prevent picking the same product twice, but if you do, there are a number of methods that can prevent such duplicate selections.
A hidden text field with an auto-enter calculation that combines product and invoice IDs can be set to validate only on unique values. This will cause an error to pop up the second time that a user picks the same product on the same invoice.
A Dwindling value list--a special kind of conditional value list can update to drop out previously selected products.
A "selection portal" (which is what I think that beverly has in mind can update to drop out products as they are selected (Or they can dim and become "disabled", or they can offer to update the existing line item's Qty field for you.)
If your product list is fairly short, you can also just show a master list of all products with a Qty field where you enter the quantity. Entering data into this field, automatically creates a line item record the first time that you do so and since every product is listed once, you can't get two line items with the same product on the same invoice. It takes a fair amount of typing to describe this method or the dwindling value list option, so post back and let us know if you want to know more about those options.