Use of constraints

I have set up SambPOS to discount selected items only if they have a discount tag (from Program Settings) set to Y. If N, no discount is allowed. This is working fine.

I have a few items with a reduced price during happy hour. When these are at normal price they are discountable, but during happy hour they are not. I figured I could change Y to N using an “Update Program Setting” action and trigger this at the same time as the price list is changed from the default “Price” to “HH”. To limit the update to only those prices on the HH list, I put in the constraint [{PRICE TAG}=HH]. I have tried several different formats for this expression but nothing seems to do anything. What am I doing wrong here?

try [’{PRICE TAG}’=‘HH’]

Unfortunately that didn’t work either.


'{PRICE TAG}' is 'HH'

Edit: However I’ve noticed you’re executing it through a trigger. {PRICE TAG} is a order related tag so it won’t work.

You can set a program setting when happy hour starts. For example you can set HAPPY HOUR setting to Active and test it with '{:HAPPY HOUR}' is 'Active'

1 Like

@Emre. I have tried as you suggest but am unable to get my HappyHour tag to change with “Update Program Settings”

For simplicity of testing I set the event as an Automation Command from two On Off buttons buttons with a subtitle to see something visible happening. My understanding is that with “Is Local” set to false, the settings in the database should be updated and I should be able to see this from the Product List screen. What is happening in practice is that the subtitle updates (confirming the rule is operating) but the HappyHour tag does not change.