Unique and Required columns

It would be great to enforce uniqueness on a column and require certain fields be set.

7 Likes

+1 i agree

+1 would be great

@Alan-ca02 depending on what you're looking for, I think you can do that with automations. You can generate a unique ID for each new row that's added, and build automations to either set default values for columns, or to scan your table for empty columns and then either fix them, or alert the user to fix them.

Hi @Alan-ca02 there are a few ways I could think of doing this.

To enforce uniqueness: If an app is used to add a row, then you can make sure that non-unique columns are never allowed to be entered. For instance, you can only allow the automation to be run if =ISERROR(FindRow(MyTable, "MyTable[UniqueColumn]=$[UniqueColumn]")) evaluates to TRUE. You can also delete columns with non-unique values using a table automation so there never are non-unique values.

To require a certain field: you can ensure that an app automation can only be run if the corresponding value has been set. Thus, you can ensure that you always have value for that column.

Let us know if this solves your issue!

1 Like

That should work I guess. But I would prefer to apply unique/not-null requirements on the table rather than in the app. That way a duplicate cannot be entered in the table view either.

Hi folks, thanks for joining the conversation! Quick reminder to please avoid +1's. Instead, we'd love to know how the topic being discussed would impact your experience. Feel free to use the heart icon as a "like" if you couldn't have said it any better :slight_smile:

This topic was automatically closed after 14 days. New replies are no longer allowed.