List.CleanByKey

Hello all,

Is there a way to Clean a list by a Key list with null and/or EmptyLists? Much like List.SortByKey works.

Thank for your help,

Hello,
Could you show any illustration of what you describe (screenshot, schema…)?
Could setting the difference between your two lists (before and after cleaning) not do the job?
You could then simply try that with DanEDU.CleanList.

I don’t know if i understand you well but have you tried the clean list node ? With a false predicat

Hello and thank you for your quick response.

I have a list of sheets and views. I am then using Springs.Collector.ElementsInView to see if a Revision Cloud is visible in those views. It returns Empty Lists for views which do not have Clouds. List.Clean works great however I need to remove the views that have no clouds.
Capture

If there was a List.CleanByKey (like List.SortByKey) I would plug the list of views in and then plug the Revision Cloud list in to the Keys. It would then have the Clean list and Clean Keys.

FilterByBoolMask


Nick,
Thanks for the reply. I have done what you suggested the problem is that the Empty Lists are in different levels of the list. It takes three List.IsEmpty and BoolMasks to remove them. Its very messy as you can see in the image below. I think this may be the only way to do it though.

Did you also try Element.OwnerView from Clockwork? It should do what you need, along with View.GetAll from BVN and a SetDifference node…

1 Like

Yna,

Using List.Clean and then Element.OwnerView works. Thanks for the solution. Seems a little roundabout at first since I already have a list of the view but works rather quickly.

Thank you all for your time,
Steven

1 Like

You’re welcome!

1 Like