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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Concat + Split + Disre...
Power Automate
Answered

Concat + Split + Disregard Null Values

(0) ShareShare
ReportReport
Posted on by 143

Hi,

 

I have a sharepoint choice column which I would like my flow to show the values in an email body on seperate lines concatenated with "- [ ]" before the value.

My statement is as follows:

concat('- [ ] ', split(triggerOutputs()?['body/column/Value'], ',')[0])

My error is that if there are no values (null) it gets stuck. Is there away to ignore/disregard null values?

InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_(V2)_-_Accounts_Ticket' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#split for usage details.'.

Output should look like:

- [ ] Value 1
- [ ] Value 2
- [ ] Value 3

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @notepadapp ,

     

    Please try:

    if(
     empty(triggerOutputs()?['body/column/Value']),
     triggerOutputs()?['body/column/Value'],
     concat('- [ ] ', split(triggerOutputs()?['body/column/Value'], ',')[0])
    )

     

    Best Regards,

    Bof

  • notepadapp Profile Picture
    143 on at

    Still getting the error:

    Unable to process template language expressions in action 'Send_an_email_(V2)_-_Accounts_Ticket' inputs at line '0' and column '0': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.

     Is it possible that it's looking a t column called '0', which would be wrong?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @notepadapp ï¼Œ

     

    Please try:

    if(
     empty(triggerOutputs()?['body/column/Value']),
     ' ',
     concat('- [ ] ', split(triggerOutputs()?['body/column/Value'], ',')[0])
    )

     

    Best Regards,

    Bof

  • notepadapp Profile Picture
    143 on at

    Thanks, it is no longer failing, however now no result is given and there are values within the column. 

    It doesn't add the "- [ ]" either

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @notepadapp ,

     

    You could try:

    if(
     empty(triggerOutputs()?['body/column/Value']),
     '- [ ]',
     concat('- [ ] ', split(triggerOutputs()?['body/column/Value'], ',')[0])
    )

     

    Best Regards,

    Bof

  • notepadapp Profile Picture
    143 on at

    Output is now 

    - [ ]

    Without any values 😞 

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @notepadapp ,

     

    Cause there is no value in triggerOutputs()?['body/column/Value'] , what do you want it be if triggerOutputs()?['body/column/Value'] is null.

     

    Best Regards,
    Bof

  • notepadapp Profile Picture
    143 on at

    Nothing, however the example I'm working with has 8 values that don't display 😞

  • Verified answer
    notepadapp Profile Picture
    143 on at

    Thanks I managed to so it out for myself. As it was an options column I initizied a string variable and put all the values together.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard