'Unique' data type

I have a data type “Class” which has a text field called “token” I then have a “Class” data type in the User data type. I am hoping that when a student correctly enters a token, the corresponding class will be added to their Class list.

Bubble is hitting me with errors saying that I am adding a list of classes and I think this is because technically multiple Classes could share one token (Unlikely but possible).

Is it possible to make a data field unique such that only one Class can have that particular toke?

Is there any other workaround?


You are probably having a “do a search for…” right? Try adding a “:first item” statement after it.

AFAIK you can’t make a field unique, so you have to make sure by yourself that your tokens are unique.