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