web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Removing selected item...
Power Apps
Answered

Removing selected items - dropdown box in gallery

(0) ShareShare
ReportReport
Posted on by 19

 

 

If(CountRows(Filter(auditScope,thisID = Text(ThisItem.thisID+1))),[LookUp(auditScope,thisID = Text(ThisItem.thisID+1),Clauses)],ForAll(spClauses.Clause,If(Not(Clause in auditScope.Clauses),Clause)))

 

 

I am probably overthinking and taking the long route on this one, but I am trying to filter a dropdown box to eliminate each selected item from previous dropdown boxes in a gallery.

 

auditScope is the collection that is linked to selected items, selected items are collected into "Clauses"

spClauses is the collection generated from the list of "Clause" in SharePoint

 

The above code basically translates to, if the ID exists: then display the selected Clause for this ID, else: display the option that are left.

 

After trying all day yesterday, the above code finally works, however for values that have already been displayed it shows blank values which I am not sure how to get rid of.

 

In the above code, to display items that are left over, I originally wanted to use:

 

 

Filter(spClauses,Not(Clause in auditScope.Clauses))

 

 

On its own this works wonderfully, however when I added it to the code it came up with a blue error line.

 

And so as I mentioned earlier, I eventually came up with this. It doesn't throw up a blue line error, however it still displays blank values where selected items should be, which is something I don't want.

 

 

ForAll(spClauses.Clause,If(Not(Clause in auditScope.Clauses),Clause))

 

 

Filter on its own.png
Screenshot 2021-10-31 084159.png
Screenshot 2021-10-31 084103.png
Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @SiyahBeyaz ,

    If you are satisfied with the current results, why don't you remove only the blank values from the results using a filter ?

     

    Filter(
     ForAll(spClauses.Clause,If(Not(Clause in auditScope.Clauses),Clause)),
     !IsBlank(Value)
     )

     

    Hope it helps !

  • SiyahBeyaz Profile Picture
    19 on at

    Perfect! That worked brilliantly, thank you for your solution.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard