cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
blkfyre
Helper I
Helper I

Why is this replace function invalid?

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
 
1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User
Dual Super User

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

View solution in original post

2 REPLIES 2
RezaDorrani
Dual Super User
Dual Super User

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
Community Support
Community Support

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#r...

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,706)