dropdown data, according to user selection.

I have 2 tables on appsheet, table Products, with the following columns, Product ID, Brand, Product and Quantity. and table Operations, with the following columns, Operation ID, Operation, Product, Invoice Number, Date, Time, Pallets, Entered By. When I start an operation, in the operation tab, I want the form options to show up according to the selection, of operation, my first option in the form, which is an Enum column with 3 values, “IN”, “RETURN” and “OUT”. My next column in this table, is Product, which is a dropdown, REF type, referencing the Products table. here is the logic i want, if the user choose, “IN” or “RETURN”, the dropdown will container all the products in the Products table, but if the user choose, “OUT”, the list will contain only products where the quantity column, in the product table is > 0. How do I accomplish this logic?

I have tried this:

IF(
[Operation] = “OUT”,
SELECT(Products[Product], [Quantity] > 0),
Products[Product]
)

when I select “OUT” list returns empty.

You tried that expression in valid_if?

https://help.appsheet.com/en/articles/961544-dropdown-from-valid_if

Are you sure there are records with positive quantity?

1 Like

Where did you place this expression, Data Validity > Valid If ?

1 Like