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 / Why is this replace fu...
Power Automate
Answered

Why is this replace function invalid?

(0) ShareShare
ReportReport
Posted on by 4
replace(triggerBody()?['ItemCode'], "<p>", "")
 
ItemCode is a value from a sharepoint list that is an html text.
I am tryting to replace all the <p> tags with blanks.
 
Microsoft flow keeps saying it's invalid even though I followed their example.
 
for ex: Replace("Hello", "ello", "i") is also invalid
 
replace(triggerBody()?['ItemCode']) is the only thing that is valid
 
Categories:
I have the same question (0)
  • Verified answer
    RezaDorrani Profile Picture
    12,143 on at

    Hi @blkfyre 

     

    use single quotes

    and replace "R" should not be caps

    example
    replace('hello','ello','i')
     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • v-yamao-msft Profile Picture
    on at

    Hi @blkfyre ,

     

    You should surround the old text and new text with a single quote but not a double quote.

     

    replace('the old string', 'old', 'new')

     

    Please check the documentation for more details:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#replace

     

    Best regards,

    Mabel

     

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard