Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Exclude an item from a filtered SharePoint list

Posted on by 41

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?

  • N03L Profile Picture
    N03L 41 on at
    Re: Exclude an item from a filtered SharePoint list

    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

  • Verified answer
    adedapo Profile Picture
    adedapo 254 on at
    Re: Exclude an item from a filtered SharePoint list

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard