Stucked in time slots in doctor's app.
Question

I have created a doctor whose appointment duration is 00:30:00 min. and the start time and the end time of clinic is 12:00:00 to 16:00:00, and i calculated the total appointment of a doctor which is 8.

Now i want to divide the total appointment slot into 8 slots with timing (for instance 12:00:00 - 12:30:00 [slot 1])

How can i add slots in screen.?

please suggest me the logic.


thanks 

doc.PNG

Solution


TimeSlot.oml

Please let me know if you are still facing issue.

Thanks that was working well, but i facing the issue that 

suppose i am selecting a slot on certain date so that slot is booked by me.

when another person comes to book a slot, the slot that I booked will appear Red or Person will not be able to select that slot which is booked by me, Please provide the logic for this also..

  

You can write this logic in many ways, there are AddDays() method using this you can add 30 mins slots. You can also use loop for calling this method. You can prepare the list of time slots and use that list as dropdown here.

Sorry sir but unable to do it, can you please attach oml or screenshot

Solution


TimeSlot.oml

Please let me know if you are still facing issue.

Thanks that was working well, but i facing the issue that 

suppose i am selecting a slot on certain date so that slot is booked by me.

when another person comes to book a slot, the slot that I booked will appear Red or Person will not be able to select that slot which is booked by me, Please provide the logic for this also..

  

Good to hear that its working for you. From removing already selected slots we need to write separate logic. I would suggest create new post for that. So both concepts will be separate. Also if you think this issue is resolved then mark this as solution, which will help other members in the community find the answer quickly!  Thanks.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.