Invalid If Repeating Characters

I have an issue in which app users are rushing to complete a form that adds new rows for vehicle inspections and they often knowingly use incorrect values in a text field, such as "Xxxx" or "000000".  

Users eventually edit the form and input the correct value, but I want to enforce using the correct values in the first place and minimize opportunity for users to short-cut the process.  My goal is to create a Valid_If expression that will reject values with more than three back-to-back repeating characters, and I cannot find anything remotely close in the documentation. Would greatly appreciate any guidance.

Solved Solved
0 6 170
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

AppSheet's text processing and analysis features are rudimentary. What you want to do is not easily possible.

View solution in original post

6 REPLIES 6

Welcome to the community!

If you must:

NOT( OR( 
  CONTAINS([column], "aaa"),

  CONTAINS([column], "bbb"),
  |
  |
  CONTAINS([column], "zzz"),
  CONTAINS([column], "000"),
  CONTAINS([column], "111"),
  |
  |
  CONTAINS([column], "999")
))

But I have to tell you that users would quickly figure it out and avoid using triple characters. Since you know what would be a valid value, a better solution is to have this field as a reference to a table that contains the valid values. 

Thank you for responding! Although that would work, it would be a very very
very long expression. I'm hoping to accomplish it in a more compact way
without having to go through every letter of the alphabet.--
Lindsey Lindow
Precision Auto Reconditioning

You can try creating a table that has the value of โ€œaaaโ€, โ€œbbbโ€, โ€œcccโ€, etc., and use NOT(CONTAIN(ANY(ValidationTable[Column])). Iโ€™m not sure if that will work since I havenโ€™t tried it but you can give it a try ๐Ÿ˜…

Thank you! Iโ€™ll give that approach a try and will report back. 

If you show the structure of your table probably community members would be able to provide you a solution. 

Steve
Platinum 4
Platinum 4

AppSheet's text processing and analysis features are rudimentary. What you want to do is not easily possible.

Top Labels in this Space