Allow only specific entry in the form

Hi,

How can allow only specific entry in the form. The first four numbers are the same. like this tracking no

4677******

2322*****

1266*******

SF34******

Solved Solved
0 1 81
1 ACCEPTED SOLUTION

Take a look at the following article in the help documentation.

 

appsheet_rebrand_logo.pngValid_If Column Constraint
 How to check if a given form input is valid based on its type.

You can use the left() function to ensure the entry starts with the correct four characters:

left([tracking_no], 4) = "SF34"

You could also use the startswith() function:

startswith([tracking_no], "SF34")

if you need to check for multiple allowed prefixes, then you can use or():

or(
  startswith([tracking_no], "SF34"),
  startswith([tracking_no], "1266")
)

if you had a longer list of allowed prefixes, then you could use the in() function along with a list:

in(
  left([tracking_no], 4),
  {"4677", "2322", "1266", "SF34"}
)

View solution in original post

1 REPLY 1

Take a look at the following article in the help documentation.

 

appsheet_rebrand_logo.pngValid_If Column Constraint
 How to check if a given form input is valid based on its type.

You can use the left() function to ensure the entry starts with the correct four characters:

left([tracking_no], 4) = "SF34"

You could also use the startswith() function:

startswith([tracking_no], "SF34")

if you need to check for multiple allowed prefixes, then you can use or():

or(
  startswith([tracking_no], "SF34"),
  startswith([tracking_no], "1266")
)

if you had a longer list of allowed prefixes, then you could use the in() function along with a list:

in(
  left([tracking_no], 4),
  {"4677", "2322", "1266", "SF34"}
)
Top Labels in this Space