Another quick tip! Removing blank items in a compose

How to use compose and expressions to remove blanks


This is a follow-up post for my earlier blog, Combine data from multiple apply to each into a single output file (Variables and compose)

Cat Schneider helped me tremendously on this one, full credit to her! Find her blog here

Thank you

Following these steps, results in some empty values also being added.

For example, if there is an empty entry, but the item exists and you specify that item it will show up.

Such as:

Log Generic - Log Feelings - it was a great day today Log Cats - Pet some kitties

Using an expression in your compose you can filter out if the log entry is empty, to not display it.

  • Go to your compose action item, Dynamic Content, click on Expression, and use the following logic: If, not empty, your log item, compose Log Generic - with your log entry

    If(not(empty([Item here for the log entry])),concat('Log Generic - ',item here if needed,': ',([log item here]),'<br>'),  '')

P.s, the expression window is really small, I recommend using something like Notepad ++ to write it, then copy/paste to your expression field.

This statement if applied to all of course, will look like:

Log Feelings - it was a great day today Log Cats - Pet some kitties

The empty log entry wont show up.