Check for repeated values using firebase

Hi, I am trying to do a user registration with firebase.
The application can upload all the data that I want without any kind of problem, I use the ID as unique identifier using device tools.

The problem happens when the user who already registered with his ID registers again, then the database modifies those values and after that I want it to tell him that “A user has already registered on this device” and finally Do not let it register if it was already registered, I try everything, but I could not find what I want.

How can I do it?
if they can share images much better. thank you very much kodular community.

Hello, how is the code being generated “Y8zrmL42Icce3WupcPd3q…”?

Create a list with all the letters a to z and all capital letters and numbers from 0-9. Then use a loop to keep randomly selecting a character from that list and use join text to create a code string. You can add any other random characters too (eg. -,!,*) whatever you want.

Then for your firebase, just get tag list, then in the ‘when tag list get’ block use a ‘for each item in list’ block where the list is value and compare each item in the for loop with your generated code. If there is a repeated one, just generate another code.

You know what I thought was that the firebase give me the list of all the labels that are within a specific project and tell me if it is equal to the value to enter and if so, tell it that "There is already a registered user with this data "and if it is not equal to any of the tags, then it lets you finish your record. (I say labels because I have this type of organization in my firebase).


But something about my blocks does not work for me, can you tell me with images how I should carry out my idea? please.

No need to create a random text everytime, it will create a big mess.

Simply use device id or phone number as unique user id for each user.

This unique id use as project bucket and store user data in it.

When new user try to create new account first call tag list of users (all unique ids as tag list) use if then conditions and check the new user id is present in the tag list or not by using is in list block.

If it is present then say account already present else go ahead.

1 Like

Save device ids as tag in another bucket…
Then set is in list block when u got tag list…

If already is in list then do {
else {

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.