Hi all,
Hope someone has some advice.
Im have a desk reservation App & I would like to limit one booking per date (per user).
Currently the App flow works like this:
Set(
selectedDate,
Calendar_1.StartDate
);
Set(
selectedEndDate,
Calendar_1.EndDate
);
Set(
startTime,
DateTimeValue(
Text(
selectedDate,
DateTimeFormat.ShortDate
) & " " & ddTimeFrom.Selected.Value
)
);
Set(
endTime,
If(
DateValue(
Text(
selectedEndDate,
DateTimeFormat.ShortDate
)
) < DateValue(
Text(
selectedDate,
DateTimeFormat.ShortDate
)
),
DateTimeValue(
Text(
selectedDate,
DateTimeFormat.ShortDate
) & " " & ddTimeTo.Selected.Value
),
DateTimeValue(
Text(
selectedEndDate,
DateTimeFormat.ShortDate
) & " " & ddTimeTo.Selected.Value
)
)
);
If(
IsBlank(
LookUp(
'Desk Reservations',
CheckOutFrom = selectedDate && CheckOutTo = selectedEndDate
)
),
Navigate(Dashboard),
Notify("You have already made a booking for this date")
);
If(
IsEmpty(startTime) && IsEmpty(endTime),
Notify(
"You must select a date and time to continue",
NotificationType.Warning
),
Navigate(FloorSelect)
)
What I can't figure out is how to notify & navigate the user back to the main screen if they already have a booking for the date selected.
My data source is an SP list, which holds the date the user has booked in.
I have variables (as seen above) of selectedDate & selectedEndDate. Im trying to check via a lookup if that booking, for the user already exixts, and if so - Flag a warning notification telling them they already have a booking for that date.
I currently get the notification that I already have a date booked - but it doesn't navigate back to the home screen, rather it continues to the next screen, which is where a user selects a floor.
Any ideas how I can prevent the user from continuing?
Thanks,
Ryan

Report
All responses (
Answers (