Valid If - What formula to use to only allow unique values

We want to restrict the ability to add a value in a field, if that value is already in the field.
i.e. we want to replicate the way Appsheet will restrict duplicate values in a “key” field

But, we use a different “key field”.
I tried making this other field also a"key", but after saving it was deselected. So appears can only have 1 key.

I know IF and COUNT should be able to be used, but not sure how to…

Thanks!

Solved Solved
3 10 7,362
1 ACCEPTED SOLUTION

Hi @Tom_Graham,

If I have correctly understood your requirement ,could you try following expression in your SKU field’s valid_if expression

NOT(IN([_THIS], SELECT(Inventory Data[SKU], NOT(IN([Custom Label], LIST([_THISROW].[Custom Label]))))))

The above expression assumes that [Custom Label] is key field and ]SKU]is the non key field that you do not wish to be duplicated.

View solution in original post

10 REPLIES 10
Top Labels in this Space