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 / Error when 'Add row in...
Power Automate
Answered

Error when 'Add row into table' if the subject is empty

(1) ShareShare
ReportReport
Posted on by 1,089
Hello,
 
As you can see, I've already specified in the Subject flow that any = sign in the subject should be omitted, but I'm now getting an error message even if the subject is completely empty.
Is there anything I can do about this?
 
Categories:
I have the same question (0)
  • Verified answer
    whitebeard Profile Picture
    135 on at

    Hello @frixel,

    The error occurs because the replace() function requires a string as its first argument. When the Subject field is empty, it returns a null value instead of a string, which causes the expression to fail.

    You can fix this by using the coalesce() function to handle the null value. Coalesce will return the first non-null value, so we can use it to default to an empty string ('') if the Subject is missing.

    Try changing your expression to this:

    replace(coalesce(item()?['Subject'], ''), '=', '')

    This ensures that even if the Subject is empty, the replace function receives a valid empty string and the flow continues without error.

    Hope this helps!

  • Suggested answer
    chiaraalina Profile Picture
    1,921 Super User 2026 Season 1 on at
    Hi
     
    An empty Subject from the email connector is usually null, not an empty string and replace() does not work on null.
     
    Please try:

    replace(coalesce(item()?['Subject'], ''), '=', '')
     
    coalesce(..) turns a null subject into ''
     
    Let me know if it worked!
     
  • frixel Profile Picture
    1,089 on at
    Thanks @ & @ that is very helpfull

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard