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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / address null rows in C...
Power Automate
Answered

address null rows in Create HTML Table

(0) ShareShare
ReportReport
Posted on by 1,164

Hi,

 

Putting the results of Get Items from a Sharepoint list into a HTML table for emailing.

 

What would be the approach to Create HTML Table but sometimes a row for a specific column will not have an entry?

 

In the 1st column I am just pulling the first 6 characters hence why the error message includes substring but I also have other columns that wont necessarily have data in them. There will always be a number of "main" columns that always have data in them.

 

Currently when I run the flow I get error message

 

The value of first parameter is of type 'Null' but the function 'substring' expects a string.

 

Thanks in advance

 

Todd

Categories:
I have the same question (0)
  • Verified answer
    Rhiassuring Profile Picture
    8,690 Moderator on at

    If I understand correctly, your issue is that you are applying a substring to everything you want to put into the HTML table, but since sometimes the column might be empty, the substring errors.


    If that is correct, then you'd likely just want to say if(empty(YOURDYNAMICCONTENT),'',substring(YOURACTIVITY)).

     

    Ie, "only perform this substring activity if this isnt null"

  • Tango Profile Picture
    1,164 on at

    Thanks @Rhiassuring No This just happened to be an example where I was using a substring. Other columns would be to just show their normal value.

    Actually Ive just realised that this might only be showing an error because I have the substring for this column as other columns with no value are displaying correctly.

     

    My attempt thanks to your assistance is but is still showing error

    if(empty(item()?['Title'])'',substring(item()?['Title'],0,6))

     

    Basically if there is any text in title field show 1st 6 characters, if it is blank do nothing.

     

    Thanks again

     

    Todd

  • Tango Profile Picture
    1,164 on at

    @Rhiassuring I was missing a ,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard