Does not contain "-" symbol in Valid_IF

Trying to a validation to ensure that there is not “-” symbol in the textbox with valid if

NOT(CONTAINS([_THIS],"-")) in the valid_IF, however this is only happen if the - is the first character, if it is in between it can’t throw error

3X_9_3_9393dcbb8f1abf76280cd7ca32cf640a54848093.png

3X_c_c_ccaa3c86d44be5cb4db648e44bfcaa81313b2b90.png

Solved Solved
0 11 764
1 ACCEPTED SOLUTION

I think your logic is backwards.

An entire validity expression must return TRUE for the value to be accepted as valid. If you want the value to not be used before, AND not have a dash in it, then you must check both sub-conditions with an AND(). If either of those sub-conditions returns FALSE, then the entire thing returns FALSE and the invalid error message is displayed.

View solution in original post

11 REPLIES 11

Steve
Platinum 4
Platinum 4

Please post a screenshot of the entire Valid_If expression.

When you entered AAAA-, did you then move the cursor out of the input box or try to save the form? For reasons that aren’t known to me, Valid_If is sometimes not applied until focus leaves the input field.

Hmm, seem that it is working now. Thanks.

if i have VALID_IF expression to check for duplicate entry. can i use the OR expression right? however if i put together two validation, if doesn’t work but if i take them individually it is working

i suppose we could have multiple validation in the VALID_IF right?

OR(ISBLANK(
  FILTER(
    "JIC",
    ([_THIS] = [New Computer Serial No])
  )
  - LIST([_THISROW])
),
NOT(CONTAINS([_THIS],"-"))
)

seem that there is a bug, sometime it works and sometime it doesn’t. following is the logic i have. now both the duplicate and the symbol checking not working.

Correct.

Unfortunately, my computer cannot play your video.

Nothing you’ve shared looks incorrect. The behavior you describe is similar to another bug I seem to recall reading about recently, so it is possibly a legitimate bug you’re experiencing. That being the case, I have to refer you to support@appsheet.com for further help with this.

Thanks @Steve for the help. will log a case the the support to take a look if it is a bug

Seems to me you should be using AND() here instead of OR() ?

i think should not be AND() as we want to check either one to throw the error.

I think your logic is backwards.

An entire validity expression must return TRUE for the value to be accepted as valid. If you want the value to not be used before, AND not have a dash in it, then you must check both sub-conditions with an AND(). If either of those sub-conditions returns FALSE, then the entire thing returns FALSE and the invalid error message is displayed.

Yes, you are right it should an AND() now it is working, even the problem where the “-” in in the middle of the sentence. maybe the bug has gone as well.

Top Labels in this Space