Valid if in data

Hi how can i add valid if like

The value contain in another table coloum

If a customer type a “number” that must be in my number list of another table. I know the another option like to select from enum. But this will show all numbers that’s why I’m looking for this option

HI @Anchor_Appadmin

Didi you try this expression ?

that should be something like:
IN(number, listOfNumber)

1 Like

But my list of data in separate table.

IN([inputNumber], tableName[columnOfNumbers])

Input number is typing, then how can i mention that

inputNumber would be the name of the column you’re typing.
If it’s not valid, at getting out of the field or trying to validate the form, you should get an error message.

I have inserted the formula but issue is the column changed to droupdow.

you entered this formula in the valid-if expression of the column inputNumber ?

Yes same but app automatically changing this to droupdown

That’s weird, because this is a Yes/No type formula.
In my opinion, the dropdown normally occurs if you provide a list type, but I may be wrong.
Can you please provide a capture of the formula editor for the valid-if expression ?

[Uploading: 20210517_203831.jpg…

AppSheet produces a dropdown if the Valid If expression produces a list or if the entire expression is an IN() expression, as is the case here. Under the hood, AppSheet only produces dropdown for IN() expressions, but recognizes that a list result as shorthand for IN([THIS], list-result), To bypass this behavior, wrap IN() in something else, like:

AND(IN(...), TRUE)

or:

OR(IN(...), FALSE)
3 Likes

I keep on learning so much today ! Thanks @Steve for the lessons :grin:

3 Likes