expression

Hello. I use the regular expression in google forms to validate the answer: 

It has 7 strings all caps 3 letters from A to Z 1 number from 0 to 9 1 letter from A to J 3 numbers from 0 to 9

^([A-Z]{3})([0-9][A-J0-9][0-9][0-9])$

It has 7 strings all caps 3 letters from A to Z 1 number from 0 to 9 1 letter from A to J 3 numbers from 0 to 9

How can I use it in AppSheet to validate the field? Thanks

Solved Solved
0 5 338
3 ACCEPTED SOLUTIONS

Welcome to the community!

Unfortunately, there's no Regex capability in AppSheet. You can either leave your regex in the sheet, or develop a very very long AppSheet expression to replace that. 

View solution in original post

Unfortunately, you cannot check validity before saving the form using sheet formulas, since they'll be calculated only on sync not before. 

What you can do to replace your regex in AppSheet:

  1. Check the length of the whole string.
  2. Check the first three characters using IFS() for the following conditions:
    1. Use ISNOTBLANK(EXTRACTNUMBERS()) to check whether it contains numbers.
    2. Use CONTAINS() on every possible unwanted special character. 
  3. Check whether the fourth digit is a number.
  4. Extract the remaining digits and check whether they constitute a number.

If any of the above checks fails, then you have an invalid input. 

Finally just use UPPER() on the string, instead of forcing users to input uppercase letters, and include all the lowercase alphabet in step 2b. 

---

Thanks for the translation 🙂 I understand written Portuguese

View solution in original post

MUITO OBRIGADO , VOU TRABALHAR NESSA INFORMAÇÃO.

ABRAÇO

View solution in original post

5 REPLIES 5

Welcome to the community!

Unfortunately, there's no Regex capability in AppSheet. You can either leave your regex in the sheet, or develop a very very long AppSheet expression to replace that. 

bom dia, mas eu tendo uma uma tabela com valores definidos, posso colocar uma condição no campo para validar se conter nesta tabela certo ?

vou pesquisar para fazer isto, se acha valido.

Vou colocar numero min e max de caracteres e maiúsculas, ja ajuda bem.

 

Muito Obrigado. 

 

good morning, but having a table with values ​​defined for me can I put a safe condition in this table?

I'll do some research to do this, if it works.

I'll put the usual min and max number and well, it helps well.

 

Thank you so much.

Unfortunately, you cannot check validity before saving the form using sheet formulas, since they'll be calculated only on sync not before. 

What you can do to replace your regex in AppSheet:

  1. Check the length of the whole string.
  2. Check the first three characters using IFS() for the following conditions:
    1. Use ISNOTBLANK(EXTRACTNUMBERS()) to check whether it contains numbers.
    2. Use CONTAINS() on every possible unwanted special character. 
  3. Check whether the fourth digit is a number.
  4. Extract the remaining digits and check whether they constitute a number.

If any of the above checks fails, then you have an invalid input. 

Finally just use UPPER() on the string, instead of forcing users to input uppercase letters, and include all the lowercase alphabet in step 2b. 

---

Thanks for the translation 🙂 I understand written Portuguese

MUITO OBRIGADO , VOU TRABALHAR NESSA INFORMAÇÃO.

ABRAÇO

Top Labels in this Space