Skip to main content
Question

How to format a form field so it has to meet X format - specifically fax number with "1"


Hi, we have a field we need users to enter the fax number with the 1 in front of it. We can't use the QuickBase phone number format because we can't have the additional characters () etc in our API. 

Other than adding instructional text (which our users so far are ignoring) - how do I prevent them from submitting/fixing an "error" before submitting by only entering 2345678900 instead of 12345678900 ?

Thanks!!!



------------------------------
Hannah Drake
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
You could go to the Advanced settings for the table and

Build custom data rules for this table:

Learn more about using custom data rules here

Turn custom data rules on?   
and enable Custom Rules.

Then assuming that you have set the phone number field to to be a numeric field,

var text Fax = ToText([Fax Number]);

IF(Trim($Fax<>"") and Left($Fax,1)<>"1", "Sorry but please Enter the Fax number with a leading 1, such as 12345678900")

That will block the save in forms mode or Grid Edit mode and display the error message.   It will allow a blank Fax#.


------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------