How to cancel a ?promt AMC

I use a promt for custom cash amount to pay ticket but how can I let the screen be cancelled, I though pres 0 enter would work but that just pays it all.

Show a screenshot of the custom keypad your using to enter the amount, and the action where you have the keypad settings as you can add an OK and CANCEL button to the keypad using O and C in the expression

This expression in the action
Amount = [?Enter Float Value;(\d{1}.\d{2}|\d{1}\d{1}?.\d{2}|\d{1}\d{1}\d{1}?.\d{2}|\d{1}\d{1}\d{1}\d{1}?.\d{2})?|0;;CON;49,50,51|52,53,54|55,56,57|190,48,8]

Will give this keypad

You now have a cancel button

I think a cancel will still submit the action but with a blank value - its just canceling the prompt not the action.
Think you would need a double step flow with a seccond rule with constraints on the actions.
Think about other actions in that rule… They would still fire?!

1 Like

That sounds like a lot of effort… Ill have a quick play for some other methods but if it doesnt work, ill just not bother, its not that critical.

It actually wasnt that difficult @JTRTech All I did was use rick’s prompt expression, for the value of an automation command


Then when that AMC was fired I just checked if the value was greater than 0 :slight_smile:

On a side note Rick is their a way for that validation of the float value to be stopped, so I could enter something like 7 or 4.3 in?

For .61 version on default numeric keyboard that appears with OCN switch I replaced enter key with decimal separator as it also works like OK button.

1 Like

Im confused about that, say I wanted a numpad promt with an ok and a cancel button, what expression can I use?

[?Enter Value;;;OCN] will display a numberpad but default numberpad does not have decimal separator so people uses long version with a customized keyboard.

OCN stands for OK CANCEL NUMERIC. If you set it up as ON it will display a numeric keyboard with OK button.

PS: Clicking cancel button should abort whole rule so additional constraints wouldn’t be necessary.

2 Likes

I used that expression but it doesnt have the decimal separator in it.

I announced it just 18 minutes ago :stuck_out_tongue: you’ll receive it on next update.

2 Likes

Oh hahhaha that makes sense.