Valid_If Expression Invalid


May i know what’s wrong with this formula under Valid_if?

NOT(In([_THIS], Slice Name [Column Name Not a Row Key]))

Im trying to achieve wherein the user cannot input duplicate value in a table slice . I understand I can simply use a row key. Unfortunately you can only use 1 column as a row key.

The formula above is working fine when adding new rows. The issue is when editing some columns on the Slice table the [Column Name Not a Row Key] is showing invalid.

Any advice how to achieve my goal?

Thank you

Please show error message and a screenshot of the column types in this table

1 Like

I believe this is a common issue because the valid_if needs to exclude the current row from being included in the compare list while being edited after it is saved. Or else the duplicate detection will happen while compraring with itself.

Please try the sugegsted expression to avoid duplicates at the end in the article below. The expression excludes the current row being used in comparison.

Edit: A small but important correction.


Yes you’re correct and it works. My new Valid_If formula is

ISBLANK(Filter(Slice Name([_This] =[ Column Not a Row Key])) - List[_ThisRow]))