I need help for my coupon app

How can you do to mark that a user has already used a coupon and that when he wants to enter he is shown that he has already redeemed it and can not use it again.

You need a process to mark it as used

yes i did it, but when i mark it to the coupon the other users cant redeem.

i don’t know if i need to create another table in the db as a redeem coupons.

It seems to me that perhaps the relationship of the used coupons with the users collection may not be set up correctly as a many to many relationship. (Presuming that a user can use many coupons and a coupon can be used by many users).

You can set it up a new relationship in your coupon collection called “Used By” and set it as a many to many relationship. Then when that coupon is used, you need to update the “Logged in User” as the action, then navigate to the “Used By” field and select “Add > Logged in User”.

Then with the list of coupons available, you can filter this list with “Used by > All” does not contain “Logged in User”. So that used coupons are no longer displayed in that list.

I hope this helps you. If you have further issues with this please do not hesitate to let me know. Happy to jump on a call with you to get this resolved.

Thanks you! Your are the best!

1 Like

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