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

Notifications

Announcements

Community site session details

Community site session details

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

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))

 

 

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard