I am developing an event registration system with an action button to ‘Book a spot’; once clicked, it grabs the logged-in account, the date and time, and the event’s name.
To prevent duplicate registrations, I would like to have the button disappear for the logged-in user if they’ve registered. Would this be possible? I have KTL installed, but I’ve scrolled through keywords and don’t believe there is one for this use.
I can think of a simple way of doing it if this helps.
Create a multiple choice field called “Registered” with True or False as the options
When the button is pressed the action also updates the field to registered = true
Then have a display rule that is “If Registered is True” hide value.
The only down side to this is if the person registers for multiple events it could become problematic, but there may be a way round this that someone can come up with that resets the registered field after an event has run.
@Elite, there’s no native way to achieve this unfortunately, as the display rules can’t access the connected Registrations records on the Events grid.
What I’ve done in the past for similar event management apps is use some JS code to do the following:
Get the logged-in user’s record ID
Fetch all values in a hidden registrations > account field in the same grid (CSS hidden)
Check if there’s a match on the user’s record ID
If there was a match, hide/delete the button
I’m happy to help build you some code if you want to message me directly.
EDIT: Note that this solution only works if you are using the parent user table for connecting to your relevant table. See Callum’s video here on why it’s a good practice.