Is it possible for a user to log in an app which has 100 restaurants and all 100 offer a discount deal by giving the user a unique barcode coupon that they can scan and can be used once and refresh automaticaly every 24 hours. So 100 unique barcodes that are different FOR EACH user so if there are 10 users then 1000 unique barcodes that cant be used after they are scanned and after 24 hours every single barcode on the app that hasnt been used refreshes. How can i do that?
1 Like
Yes, that would be possible.
- I would generate the Barcodes in the Restaurants table
- Create a template column that concatenates the Signed In Users ID, the RestaurantID and the current date.
- Use that column to dynamically generate a barcode. Glide has a plugin for this.
- Add a User Specific date/time column (Barcode Last Used) to the Restaurants table
- Show the barcode on the Restaurants details screen in an image component
- When a user scans a barcode, have them (or the restaurant staff) tap a button on the same screen. That button should do a Set Column Values on the user specific date/time column, setting it to the current date time
- Set a visibility condition on the barcode image component such that it’s only visible when the last used date/time column is not within today
The above approach is just off the top of my head, so it might need some refinement. But something along those lines should work.
4 Likes
Thank you im pretty new so i didnt understand much i am completely lost are there any videos that explain this proccess or anything similar?