Hi all,
I was wondering if someone can help.
I have created a app that stops a user booking a slot at the same time/date as another user
the time slot is a drop down
the date is a calendar component
the current code iv got works for this but I want to add in a teacher drop down so that a parent/user can book in with a teacher but I want this to be a system which stops the users from booking the same teacher/time/date as another
my current code:
If(
IsBlank(LookUp('Parent Booking_1', 'Time slot'=Dropdown1.Selected.Value && Date=DateValue(Text(Calendar_1.StartDate))).ID),
Patch('Parent Booking_1', Defaults('Parent Booking_1'), {Title:TextInput1.Text, Date: DateValue(Text(Calendar_1.StartDate)), 'Time slot':Dropdown1.Selected.Value});Navigate(Screen3,ScreenTransition.Fade),
Notify("The date and time have been selected. Please select another time")
)
I need to add a teacher dropdown to this code and make it so no double bookings are possible.
Please help! Thanks in advance!
Solved! Go to Solution.
I assume you are getting the Teacher name from the Dropdown? If so, then this:
If(
IsBlank(
LookUp('Parent Booking_1',
'Time slot' = Dropdown1.Selected.Value &&
Date = DateValue(Text(Calendar_1.StartDate)) &&
Teacher=dropdownTeacher.Selected.Value
).ID
),
Patch('Parent Booking_1',
Defaults('Parent Booking_1'),
{Title:TextInput1.Text,
Date: DateValue(Text(Calendar_1.StartDate)),
'Time slot':Dropdown1.Selected.Value,
Teacher:dropdownTeacher.Selected.Value
}
);
Navigate(Screen3,ScreenTransition.Fade),
Notify("The date and time have been selected. Please select another time")
)
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |