Editor Widget Automation Value

Hi @emre - I may be too late for me but why do we not have a value to pass Automation for an EDITOR WIDGET?

For Example:
When completing a Denomination Screen we need to trap the Denomination entered in Cash Out procedures. Having a value means we would only need 1 save RULE for all denominations. At he moment we would need individual RULES…

Thanks.

Sorry I couldn’t understand. Do you mean Automation Command Value? That is the value you entered in editor.

Oh I am having a “brain fade” - of course - its passed as [:CommandValue]?. I guess I was trying to trap the Editor Widget Name then our 1 RULE would be constrained by Name and only save 1 setting…

One Rule to handle all denominations of currency …

All Editor Widgets have this format …

So the “magic” in the Rule comes from the Rule Constraint:

Automation Command Name Contains CO Set USD Count

The [:CommandValue] will have an integer in it representing the Count of the bill.

Then the Action saves a setting by parsing out the [:AutomationCommandName] by grabbing the last 3 characters which will be one of: 100, 50, 20, 10, 5, 1 and multiplies that number times the Count.

Setting Name derived as:

[='USDcount' + TN('[:AutomationCommandName]'.substr(17,3))]

And so the Setting Name will be one of:

USDcount100
USDcount50
USDcount20
USDcount10
USDcount5
USDcount1

And the computed value stored in the Setting is derived as:

[=[:CommandValue] * TN('[:AutomationCommandName]'.substr(17,3))]

… so it will calculate as such (ie. given the count for each bill is 5) …

5 * 100 = 500 ... stored in Setting USDcount100
5 * 50  = 250 ... stored in Setting USDcount50
5 * 20  = 100 ... stored in Setting USDcount20
5 * 10  =  50 ... stored in Setting USDcount10
5 * 5   =  25 ... stored in Setting USDcount5
5 * 1   =   5 ... stored in Setting USDcount1
2 Likes

Ah of course @QMcKay- I was studying Ricks sample Cash Out screen but ran out of battery on the plane last night before I got to yours!!! [:AutomationCommandName] - was the key, and I have named all my AUD denominations already to use the concatenated format.

I gone 1 step further as I needed to also embed Terminal Number so I can have individual Cash Draw Balances :grimacing:

Thanks - think I am struggling from lack of sleep and way too much data…

Now you see @QMcKay you are always pushing he boundaries! :stuck_out_tongue_winking_eye:

RULE

RESULT

Multi-Department, Multi-Terminal, Multi-Denomination :smile:

1 Like