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

0 12 195
12 REPLIES 12

Aurelien
Google Developer Expert
Google Developer Expert

HI @Anchor_Appadmin

Didi you try this expression ?

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

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)

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

Top Labels in this Space