I am Making a form of students in which I need a unique number

I am making form in which I need Only numbers which starts from 1 and next number never repeats and next number will come 2 …how to use blocks for this when I will click a button then automatically unique number( starting from 1) will come and stores in firebase and that number will never repeat again.

it would probably be easiest to use a cloud variable for this.

can you explain me in more details. I want to know that how to use blocks for this and I am using firebase in my project.

Please help me

Hi, @sakshamgoyal4031! :wave:

This idea must help you -

  • Setup Airtable in Thunkable, and create a column in the database.
  • Whenever you click the button, generate a random no., and check weather it’s present in the database.
  • If it’s present, then generate another no. because the previous no. is already present/used.
  • When a new no. is generated, use it your way, and add it to the Airtable column.

Thanks! :blush:
P.S. This method is not that much efficient, because it only checks the original no. - not the new one. I’ll come up with an efficient method soon. This doesn’t mean that you can’t use this method.

Can I use this with Firebase ?(because I am using firebase) If yes please tell me how and please tell me about how to use blocks for this .
Thanks :blush:

@jared

I want to do that when button is click a unique Id (can be start from 1 and this number will not repeat again once used) how to do this in air table.How to set blocks for this?
Please help me.

Hi
I am Making A form for students in which I want to do that when form screen initialize automtic a unique number which is plus 1 from previous number appears on screen and that number should not repeat again.
Please help me I am facing a lot of problem.

See this post

1 Like