How to assign a unique coupon code in airtable and display it on thunkable.?

Iam creating a form for students, whomever the student had filled their details…coupon code should appear on the screen… Please help me out in this… how to write a code for this.?

There are many ways to achieve this. The easiest is to save the record (row) then get the row ID and use it as a coupon. The row ID in Airtable is always unique.

2 Likes

Hey @mounikaperumalla007y you can fill all the coupon codes in every single column and row and you can randomly call a column and row and then show it on a label

1 Like

Can you please help me out with the blocks to be used in this case…

Sir, i do have separate list of coupon codes… I should use only those codes…

Sir, I got your point…Each cell in the airtable does have a unique i.d, whenever we represent the i.d the value of the cell will be displayed on thunkable…can you please help me with the coding blocks sir…

1 Like

I’m not sure who are you referring to but let me explain the setup as I understood it.

You need 2 tables at minimum to do this task, A table for your students info and another table for the coupon codes.

Whenever any student registers in the app, you will save the student details along with one of the coupons which your app selected from the coupon table. Once the new registered student info is saved successfully, you will go to the coupon table and remove that coupon. This step is required to avoid using the same coupon more than once.

This is how I understood your requirement. If this is not correct, please correct it.

I have made a quick project to show the idea. The project is not complete and might have error but it will clarify the process.

https://x.thunkable.com/projectPage/602a8832b8d4970191dee660

Thank you for the link sir. I will implement and consult you for further clarification sir.

1 Like

Sir, may i know the design components you have used, rather than buttons and labels…

1 Like

Hello,

  • Buttons
  • Labels
  • Two tables which can be Airtable (I used Local Storage) for simplicity but both works the same.

One table for the student data
One table used as a list for coupons.

Everything else is in the blocks (codes).

ok, sir.Thank u so much, sir. I will let you know if there any doubts further sir…

1 Like