I am working on an booking app with Calendly-like booking function, most of the things work well except the record display problem.
The situation is that after I click some timeslots (like 08:00, 08:30, 09:00), the choices’ state will be changed from “no” to “yes”, and the chosen timeslot will be recorded to database and display in the app. The problem I am facing is the timeslot is duplicated many times and the duplicated records are shown. Is there any way to solve the problem?
This might be a dumb question, but why is it making multiple of the same time slot? How do you make timeslots, and what does that workflow look like? So your repeating group is fine just it’s showing a lot of timeslots with the same time ranges?
I’m thinking to make a state with “yes/no” type to indicate which option is chosen, and use it in the workflow or element’s condition. But I’m not really sure how to do that.
Should the user be able to book more than 1 timeslot at a time?
What data type is “selected” state? Is it a list or a single timeslot? Sounds like you are appending a timeslot record to the state every time a timeslot in the RepeatingGroup is clicked. In your workflow, be sure to check the timeslot is not already in the selected list before adding it to prevent duplicates.