I am creating Training Room booking in the power app. I am stuck on this one. In the project, we have 2 different share point list
1. Room Name List
2. Booking List
I Insert the gallery in the home screen for the room list to show a list of rooms. Also, I create a button. Hear I need action that the button should invisible if the room was booked already. but it should validate in the Booking list for that particulate Room Name, Status, Start Date and Time, and End Date and time.
What Formula do I need to use? Pls, help.
On the visible property add an If statement in the visible property. In the If statement lookup the record and check the status then set the visibility to true or false depending on the status.
I tried but It's throwing an error Pls Help. (Gallery4 is the Room details list)
If(LookUp(Bookings, 'Room Details'.Value = Gallery4.Selected.Name && DataCardValue2.SelectedDate >= 'Start Date'&& DataCardValue6.SelectedDate <= 'End Date');true;false)
You're not using LookUp correctly inside the condition. You have to compare it to something.
In this case, if you want it to check if a record with these conditions exists, you should use IsBlank(LookUp) or !IsBlank(LookUp). Also, you don't need to use .Value after 'Room Details'.
You could try this code:
If(IsBlank(LookUp(Bookings, 'Room Details' = Gallery4.Selected.Name && DataCardValue2.SelectedDate >= 'Start Date'&& DataCardValue6.SelectedDate <= 'End Date'));true;false)
I hope this helps!
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!