Hello everyone, i'm trying to fullfill the following requirement in powerapps. The user in the gallery can choose a type of product and the quantity associated, and the quantity choosed must be equal to a given value. In the case the user can select that type of product only one time the problem is quite trivial. However the user in the gallery can insert multiple rows of the same product and i have to ensure that the sum of such quantities must be equal to that number.
Let's make an example: i have the product 'Computer' with a given value of 20. In the case the user insert just one row of type computer the system must ensure that the quantity set by the user is extactly 20. In the case the user insert in the gallery, let's say 3 rows of type 'Computer', the sum of the three rows must be equal to 20, same for dfferent quantities.
I was struggling a little bit trying to achieve this. Which kind of approach do you suggest me? Which properties of controllers can i exploit?
I thought about a way to update dynamically a variable based on the values input by the user, such that when the value of the variable (composed by the sum of the quantity of the product of that type) do not match the desiderable value, the system gives an error, but i didn't make it.
Hope you understand my problem, thanks to everyone who'll help me.