Hello there.
I'm getting closer to delivery day with my Reservations/Booking app and the first bit of feedback I've had needs me to modify a filter than @cha_cha helped me with a few weeks ago.
I'm filtering the options presented in a drop down using...
Filter(Desks,Not(Title in ShowColumns(AddColumns(Filter(Desk_Booking,Reservation_Date=DatePicker.SelectedDate),"colTitle",Desk.Value),"colTitle")))
I've added a new item to the 'Desks' list with a title of "NONE" to provide the users an option to select only a Parking Space and not a desk and vice versa but, now that I'm trying to modify the filter, to make it so that "NONE" appears no matter what, I'm failing to get the syntax/position correct.
Can you help?
Thanks for the suggestion @adedapo It took me a while to get it to work and was convinced that something was wrong but it's doing what you intended and I'm very, very grateful for your help.
Thanks
N03L
Ok are you trying to exclude Desks that are reserved from the dropdown?
If yes, then try this
//Use a collection
ClearCollect(colReservedDesks, ShowColumns(AddColumns(Filter(Desk_Booking, Reservation_Date=DatePicker.SelectedDate),"colTitle",Desk.Value),"colTitle"))
//If you want to add NONE as first option
ClearCollect(colAvailableDesks, {Id:0,Value:"NONE"});
Collect(colAvailableDesks, ShowColumns(RenameColumns(Filter(Desks,Not(Title in colReservedDesks)),"ID","Id","Title","Value"),"Id","Value")
//Items property of dropdown
colAvailableDesks
With the available desk collection structure, you can use the selected item of the gallery to update the lookup Desk column in Desk_Booking directly.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.