Question
5
Replies
2477
Views
Bank Of America
Posted: March 12, 2018
Last activity: April 6, 2018
Closed
Limiting the user from selecting Appointment timing which is already selected by another user
In my use case, I have a requirement that the patients has to select the timing for appointment with the Doctor.
If the Doctor is already booked for an appointment with other patient at a particular time, that timing should not be available for other patients. How to implement this scenario??
Hi Sainath,
You can achieve this requirement with steps below steps,
1) Create an Activity and pass the complete timing list(Say A) to it.
2)Do an ObJ-browse to get the list of already booked slots(Say B) from DB(You have to save the selected data in DB with some status lets say "BOOKED" when user selects a value).
3) Loop A first and inside it, Loop B.
4) Compare the value of A to match with B and status is booked.
5) Remove all the time values which has booked status.
6) Store the remaining values in a Page and source it to dropdown in UI to display the available slots.
Hope this helps!!.
Thanks,
Bala