Union() and Intersection() List Formulae

There is a particular formula that I find myself writing a lot, and I would like to have a short-hand for it:

ListCombine(ListA, ListB, ListC...)
  .Unique().Filter(CurrentValue.IsNotBlank())

The I keep writing this formula mostly when writing button actions to add a list of things from one place to a list of things in a particular cell, and one or both of them may be blank.

I would rather write Union(ListA, ListB, ListC...) instead of the longer version above. And it would be equivalent except in the very particular case that one of the lists actually contains the blank value "" (not empty list) in which case I would expect Union() to keep that value, whereas the first one filters it out.

Secondly, I haven’t found as many use cases for this one, but it would be nice to have the complementary formula Intersection(ListA, ListB) as a short-hand for:

Filter(ListA, 
  And(
    ListB.Contains(CurrentValue), 
    ListC.Contains(CurrentValue),
    ...
  )
)

Also mentioned here:

2 Likes