In the attached example, I can assign a buyer to a slot by typing the slot number in the text field and click on the button.
When I click on the button the buyer will be assigned to the slot I provided.
If the slot is available i.e. “blank”, then the buyer is assigned to it together with its items.
However, if the slot is not “blank” i.e. there is a previous buyer assigned to it, then there are 2 cases:
1st case: if the slot I selected has already a buyer which is different from the buyer I selected for the slot, then there is a warning message to the user to overwrite the previous buyer and items with the new buyer and related items; (this is already working fine)
2nd case (for which I kindly ask for help): if the slot I selected has already a buyer which is THE SAME buyer I selected for the slot, then the number of items already there should be summed up with the new items for the same buyer. For example, the buyer B has 2 new items to allocate and I would like to assign the slot 2 to it which however has already 5 items assigned to Buyer B. Therefore, when I type slot 2 and click the button, the system should sum up 5+2 for the Buyer B in the slot 2. How can I sum this up? Besides, there should be a maximum of 150 items to assign to the same buyer hence when a Buyer hit this limit there should be a message to the user “not possible to assign any more items”.example2_solved.rp (149.5 KB)