Custom Keypad CANCEL button does not work

You want it to cancel the entire action? Its not as simple as just removing keyboard… your firing an action that uses that keyboard as an input method. Cancel should cancel the action…so this means it would need to cancel the action if nothing is entered. Not sure how that would be set up… maybe you should use an ask question action instead.

Please… please let us see your keypad configuration, rule, etc…

Another issue i have is that i cant use two different types of custom keyboard/pad. For example in my petty cash rule i need an keyboard to enter text for “petty cash reason” but a number pad to enter “petty cash value” it doesnt matter how I have the settings for description and value set up the keyboard doesnt change to a key pad when selecting the “petty cash value” box. See below screenshots for setup


@emre here is the example with the CANCEL button added, when pressed it does nothing


I am pretty sure its not designed to just switch keyboards based on which dialog your cursor is in. You should probably make one keyboard with numbers at top. So in this instance using the default non custom keyboard would be best.

Unless @emre wants to program it so it works when you switch input boxes with your cursor or touch. I dont even know if thats possible.

Your regex does not allow empty values so you can’t cancel it.
Surround regex with ( and )? as shown at the ending part of this tutorial.

@kendash he is executing account transaction action that normally does not show a screen. However when we send zero amount to this action it displays entry screen.

In his case he can’t cancel flow because his regex does not permits it.
So he enters 0 and transaction screen displays.

I am referring to the second question he had…

1 Like

Oh OK. I’ve didn’t noticed there is another question…

In his screenshot he is using [? for both the description and the actual number input. He is wanting to to swap to a different keyboard when he places his cursor in the next dialog box from within the same action. It seems to me just using one keyboard is the smarter route.

if keyboards cant be switched between the two dialogs, my thinking was to create a single keyboard with numbers on top thanks @Jesse

RickH dont use custom keyboard just let it use the default its already setup for that. You can save yourself some complication this way :stuck_out_tongue:

you’re right that is easier, i was trying to be clever haha!!

Where do i need to put ( and )? that @emre suggested? i dont know what the regex is

this is the expression

[?Enter Petty Cash 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;;N;49,50,51|52,53,54|55,56,57|8,48,13|0,190,0]

[?Enter Petty Cash 
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;;N;49,50,51|52,53,54|55,56,57|8,48,13|0,190,0)?]

your regex is everything after the semicolon

[?Enter Petty Cash 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;;N;49,50,51|52,53,54|55,56,57|8,48,13|0,190,0]

This part is mask regex. So it should be…

[?Enter Petty Cash 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;;N;49,50,51|52,53,54|55,56,57|8,48,13|0,190,0]

woops your right sorry I almost told you wrong.

could you check this for me, i removed the custom keypad type as it wasnt needed and added the brackets but i got an error message saying syntax error and samba crashed

[?Enter Petty Cash 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;;N;)?]

Look at what @emre said I was wrong I am sorry. I included the keyboard which is not part of regex I responded too fast.

Yours should be

[?Enter Petty Cash 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})?]

Excellent thanks, CANCEL buttons works perfectly now!!

What do i need to add to this expression to ensure that something must be typed in to petty cash description, currently this can just be skipped without entering any text

[?Enter Petty Cash Reason;;;CS;]

and what do i need to add to petty cash amount to ensure the value entered is greater than zero? AND i also need to be able to enter a MINUS before the petty cash value in case i need to correct an input error, currently i cant type the minus button but i dont know where to add it in the expression

[?Enter Petty Cash 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;;CS;]

Those need to be Rule Constraints. Set a custom constraint for Command value Greater 0 and another custom constraint for Command Value Is Not Null. Then set it to match All. That should work.