COVID19 Triage

Hi Folks

I am new to AppSheet and not a programmer. Our company deploys nurses and PCAs to work in homes of clients who need personalized home care.

I have used a Google Form to get daily updates on the status of the employees but because their input is often inconsistent (name, phone #) it creates problems when we try to evaluate the responses to the daily schedule.

I used AppSheet to generate an App but it does not honor the regular expression that restricts the phone numbers to 10 numeric digits.

How can I get around this?

You could use a Valid If expression as a column constraint.

Thank you Ron

Can you tell me where do I do that?

Thank you. I have looked at the “examples” and they are all cryptic. I would like to see real examples. Like

IF ISNUMBER[_THIS] AND LEN([_THIS]) = 10 AND LEFT([_THIS],1) <> 1 AND LEFT([_THIS], 1) <> 0 AND MID([_THIS],1,1) <> 0 AND MID([_THIS],1,1) <> 1 THEN
Phone number is acceptable.

The expression I had in Google forms worked but did not carry over

^[2-9]{1}[0-9]{9}$

\b[2-9][0-9]{9}\b

Dear Jahmoon,

I am not a programmer either, I will try to do my best to interpret your regular expression in google forms:

Your first number must be any from 2 to 9 (exclude 1 and 0)
You must have 9 more numbers from 0 to 9

To do this in AppSheet I would:

  • Set the Phone field as “Number”.
  • Edit that field and in “Type Details” set a minimum value of 2000000 and a máximum value of 9999999
1 Like

Pablo, that is exactly the type of solution I wanted. Thank you very much. I will try it!

1 Like

The app reads the form, it sees the word telephone and it insists the input is a phone (yet it allows text)

I change it to a number, it reads number, I put in minimum and maximum values and it does not allow any input. It just puts in 2,000,000,000/ Sigh!

The app reads the form, it sees the word telephone and it insists the input is a phone (yet it allows text)

I don’t understand “insists”

OK, so: Switch “Thousands separator” to OFF position.

Apparently your upper limit is too high.

When I designed the Google Form the question said “Telephone number”
AppSheet automatically reads that column as type phone and if I change it to number it gives error statements.

I actually have to return to the form and change the wording (imagine that). Now when it sees number, that is okay. Yet it does not work with the Ranges (I haven’t figured out that yet)

Eventhough you can force AppSheet to use Number field instead of Phone Number, I assume that for your purposes a Phone Number field will be even better.

So do this:

  • Leave the field as a Phone Number
  • Edit the field and in “Data validity” / “Valid if” put this formula:

and (number([_this])>1999999,Number([_this])<19999999)

1 Like

Thank you very much. I now realize my error. I was trying to type the formula in the column, not knowing where Valid_If was. You have been very helpful

3 Likes