Want to create random tag in firebase

I want to create random tag, but every time it creates same tag

Do you re initialise the screen everytime you create a new entry? If not the ID variable will remain the same.

Set the random number for the ID variable inside your Datasubmit event.

You might consider using an index generator, to keep your tags in order on Firebase?
Index Generator
(there are other methods for this)

1 Like

No I have not re-initialized. Could you please tell me how to re initialize using block

If this is your only screen (Screen1) then you have to restart the app. If you have more than one screen then you can switch screens.

But much more straight forward to set the id variable in your Datasubmit event, then every time you submit a new record, a new number is generated.

After storing the value set the global id agiain to random number

Thanks a lot… It works…

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