I am trying to constrain the number of Toppings for a Pizza via the Portion.
It works ok if I select the 1-3 Toppings Portion and begin Tagging. It will stop at 3 toppings and allow no more.
But if I select the 4+ Toppings Portion, then do Tag selection, it allows for unlimited Tag Quantity, which is fine.
But if I then switch back to 1-3 Toppings, all the Tags remain from the 4+ Portion, which overcomes the “3” limit. So I want to remove all the Tags when the Portion changes to prevent this.
I will take a look at Order Tag JSON … you might be correct on that it might override the Tags.
LOL, that might work pretty good too - thanks for the suggestion!
BTW, IIRC when using update order it seem the value on screen does not update even using display ticket. I need to add order then cancel or select unselect I think.
Using {ORDER TAG LIST:X} and Loop Values Action to remove all Order Tags from the “Pizza Toppings” Tag Group when the Portion changes to “1-3 Toppings” …
The basic idea is that it keeps count of the number of Order Tags from a specific Order Tag Group, and if that count exceeds a certain value based on the selected Portion, then it disallows adding more Tags.
It also monitors the Order Portion Changed Event and when that is triggered, it fires a Loop Values Action which in turn triggers the Value Looped Event to Untag the Order for a specific Order Tag Group.
The Loop Values Action is supplied with a list (comma-separated) of Order Tags from a specific Order Tag Group using a Program Setting which was previously populated using the tag {ORDER Tag LIST:X}, in this case {ORDER TAG LIST:_Pizza Toppings} where _Pizza Toppings is the Order Tag Group Name.