Assignment of schedules

Hi everyone.
I need to make a calendar of medical appointments, in such a way that they can not overlap day, schedule, office, and with an intermediate interval between shifts.
With the calendar view you can not, since it is only a view, you can not select date and time directly by clicking. Therefore, I try to do it with Valid If in each field, but the selection is not sequential, the fields are interdependent.
Look for some example app, and I did not find it.
Is it posible to do?

0 7 1,962
7 REPLIES 7

Harry2
New Member

@Alfredo_Pou Hi Alfredo, could you give us the name of the app that you’re working on, as well as the names of the relevant tables and views.

Adding @morgan to investigate further.

@morgan
Apologies for the delay in responding, but I had to deliver the finished app.

I think the solution would be to add the Quick Edit function to the calendar view.

This can be applied to any app where you have to make some kind of reservations, whether it’s a doctor’s office, a travel booking, or movie tickets, or whatever.

To be able to click on the date and then on the schedule, or to paint the time range and some type of condition that allows to block that time range, in the case that the shift is already occupied.

Basically, it is more graphic for the user.

In this case, I configured the calendar as read only to avoid confusion, and generated a form where the user must select the date (which opens the system calendar), then the start time, and end time (which opens the clock of the system), and it would be more direct to select in the same calendar view and then go to the form with those data and proceed with the selection of the office, or the room, or the professional, etc.

I was reading about the integration with google Calendar, and I thought I could embed a google calendar in the app, but also integrate it as a table, and the view would be the same.

As always, thanks for the interest in improving the platform day by day

@Harry

I still have problems with overlapping schedules.
I had resolved the issue, as follows:
I generate a list of events whose start time is less than the time I am entering, and their end time is longer, and I do the same for the end time.
In other words, I generate a list of the events of that day and that room, which contain both the start time and the end time that I want to enter. If the amount is 0 it means that this schedule is free, otherwise there are other event already scheduled.

The problem arises if the event I am entering contains another one of shorter duration already scheduled.
For example: There is an event that uses Room1 from 3 pm to 6 pm. and I want to use Room1 that same day from 2 pm to 8 pm, in this case, my solution does not detect that there is a content event.
How can I do to list all the events that are within the range)

START TIME: Valid If:
IF (
COUNT (
SELECT (Events [Event Id],
AND ([_ THISROW]. [Event Date] = [Event Date],
[_THISROW]. [Start Time]<= [End Time],
[_THISROW]. [Start Time]>= [Start Time],
[_THISROW]. [Salon] = [Salon])
)
)
= 0,
TRUE,
FALSE)

END TIME: Valid If:
IF (
COUNT (
SELECT (Events [Event Id],
AND (
[_THISROW]. [Event Date] = [Event Date],
[_THISROW]. [End Time]>= [Start Time],
[_THISROW]. [End Time]<= [End Time],
[_THISROW]. [Salon] = [Salon]
)
)
= 0,
TRUE,
FALSE)

Use the same Valid If expression for Salon, Event Date, Start Time, and End Time:

IFS(
  AND(
    ISNOTBLANK([Salon]),
    ISNOTBLANK([Event Date]),
    ISNOTBLANK([Start Time]),
    ISNOTBLANK([End Time])
  ),
  ISBLANK(
    FILTER(
      "Events",
      AND(
        ([Salon] = [_THISROW].[Salon]),
        ([Event Date] = [_THISROW].[Event Date]),
        IF(
          ([Start Time] >= [_THISROW].[Start Time]),
          ([Start Time] < [_THISROW].[End Time]),
          ([End Time] > [_THISROW].[Start Time])
        )
      )
    )
  )
)

@Steve

how could this be amended for when appointments arent on the same date…i.e. multiple days for reserving a room or etc…

Replying here cuz I have a similar question. If the user wants to book a trainer for 4 days starting on Mon and through Thur, my current setup uses a Start Date column of type REF. The table referenced has three columns. Date | Trainer | Status. Status is set to either “Booked” or “Available”. The Date column contains every date from Today()+90. So this table updates every day.

Now the problem lies, if a trainer has Wed booked and a user per above wants to book them from Mon-Thur. How do I make this request invalid?

Valid If formula: SELECT(TrainerCalendar[Date], AND([_THISROW].[Trainer_Name] = [Trainer_Name],[Status]=“Available”))

Taking advantage of the topic, I have a similar question, with overlap, but with a difference: There may be availability between the start and end times, for other users.

What if it were to control two interdependent schedules, but where the start time and end time were incremented by the time required for such an activity to be accomplished, such as, for example, the time required to reach that location, in the case of an App to take children/elderly people to that place and then pick them up at the specified time, allowing the time interval between the likely time of arrival at that place and the already defined pick-up time to be available for other activities, whether by the driver or the vehicle (which are shared among other drivers)?

Top Labels in this Space