How can I correct my UNIQUE(SELECT()) expression for the Category Valid_If?

For example, suppose the app has two tables: a Products table and an Outbound table. Both tables have columns for “Product Name” and “Category.” The Products table is the master table, and the Outbound table manages transactions—that is, the columns in the Outbound table reference the Products table.

I want to set up the Outbound table’s form so that when a user selects a Category, only the Product Names belonging to that category are displayed. However, I can’t think of the correct expression to achieve this.

Both the display and the app’s functionality work correctly, but a yellow warning triangle appears.

Currently, for the Category column’s Valid If I have:
UNIQUE(SELECT(Product[Category], TRUE))

and for the Product Name column’s Valid If I have:
SELECT( Product[ProductID], [Category] = [_THISROW].[Category] )

I believe that if I can correctly write the expression for UNIQUE(SELECT(Product[Category], TRUE)), the issue will be resolved, but I can’t seem to get it right. Again, aside from the warning triangle, everything is working as expected.

I assume you mean that this warning reflects next to dropdown items? Which dropdown list is it showing in?

The yellow warning symbol means you are not listing the actual ROW KEYS of the datasource the column is based on.

I’ll assume based on your comment, you are getting the warning symbol in the Category dropdown list.

This should fine. BUT IF a REF column, then it implies there is a Category table and it depends on how you are assigning [Category] in your Product table. For it to work correctly, the [Category] column in the Product table MUST be assigned the ROW KEY value from the Category table.

If this is not clear, please show us your Category column definition in the Product table and the expression you are using to list or assign the Category choices when a user inserts a new Product.

I hope this helps!