Column Valid_If Toggle Button for 'Require Unique Value'

It’s a fairly common need for developers to validate user input as a unique value for a given column.

This is a little tricky in AppSheet, but @Suvrutt_Gurjar has posted a great solution:

However, that’s not the easiest thing for a new user to figure out.

Could we get a toggle button to require unique values?

Screen Shot 2020-04-30 at 7.47.51 AM

I’ve found myself going back to the same post several times to remind myself how to implement this common requirement. This is much easier to accomplish in most other platforms, as it tends to just be a toggle button with no expression needed. Thanks for considering! :slight_smile:

Hi @GreenFlux ,

Thank you for referring my name. However I must mention that the solution existed in an AppSheet help article “List Expressions Artcle” under “Avoiding Duplicates” topic. I merely have , if I may say , “reworded” it in various responses on eliminating duplicates expression requesting posts, just so that the person posing question imemdiately gets it. In many posts I have even referred the original article and topic.

Edit: In fact in the very post that you have referred above, I have mentioned reference to that article. :slight_smile:

Somehow I find that this topic on avoiding duplicates is no more in that article , perhaps because now UNIQUE() is there? I may request @Steve to share his insights.


I overhauled the list expressions doc and removed examples that really were more appropriate elsewhere. Duplicate avoidance should be in Valid_If. But we also need an example somewhere in the meantime. I’ll try to get something up shortly.

I agree with @GreenFlux’s proposal, BTW.


Thank you @Steve

Yes, I agree that @GreenFlux’ s proposal is practical one. Have upvoted it.


I made a similar request a while back that didnt garner much traction :smiley:

I agree this would make things much better for new users.

1 Like

I have voted your request also, sorry for late reading your post.

Voted both.

Ha! Yeah, I noticed the dead link too, and your post was the only source I could find to reference. Glad you made it since the original doc is gone! :slight_smile:

1 Like