How can I force my users to populate the phon...

(Brady Lovell) #1

How can I force my users to populate the phone number input to (###) ###-#### ?

I have a basic ‘Contacts’ table with Name, Street, City, State, Zip, Phone. On the gSheet side, I have the [Phone] formatted so that it displays as mentioned above. As my app stands now, the user can input any kind of phone number they want. I want to force them to input the numbers in the specified format. I’ve done some searching and couldn’t quite figure it out. Any and all help is greatly appreciated!


(Grant Stead) #2

From what I understand there is no firm masking in appsheet… Basic stuff like a valid on length, or requiring 2 parentheses… That stuff would be just some expression work in the valid if… But in my experience a non visible rule set really frustrates a user

(Brady Lovell) #3

@Grant_Stead Is there anyway to create an expression in the Valid_If and have a pop up warning show the correct input method?

(Grant Stead) #4

@Brady_Lovell nope, the statement is a vanilla invalid box out that can’t be changed… You can always make an initial value to mimic what you want… but yeah the good options are pretty limited, I just don’t stress it… I only put valid requirements when the data really really needs it…

(Brady Lovell) #5

Thanks for the info @Grant_Stead! Guess I’ll just have to live with what I have available and hope AppSheet comes up with some sort of update to allow this option.

(Aleksi Alkio) #6

I don’t know if this feature is a “must” or not, but if your users needs to type the phone number like that, you can create an expression that could check everything from that entry. Not very simple formula, but doable. As Grant mentioned, it’s not a good idea if the user can’t understand the reason, but if you add a virtual show field with an explanation if the format is not correct, your user would understand it. Show the correct format with the description field and show the virtual show field only, if the validation is false.