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 / Replace and split func...
Power Automate
Answered

Replace and split function not working on a string

(0) ShareShare
ReportReport
Posted on by 334

The functions are not doing anything on a string wit a lot of null (\u0000) carriage return (\r) and newline (\n) characters.

 

I'm trying to make a flow that is working with a .json file on an onprem server.

 

So in a nutshell:

1. Connector Filesystem (Get File content using path' over onprem datagateway working fine.

2.compose action with the output:

Vitss_0-1707377876393.png

 

 

3. compose action with the base64ToString(outputs('Get_file_content_using_path')?['body']?['$content'])

Vitss_1-1707377876397.png

 

 

4. no matter if I clean this content or not (removing ï¿½ï¿½) I need to replace the null bytes (\u0000) newline and other 'trash' values (\r, \n) 

5. next expression does not do their job, no error but same value as output:

  •  replace(outputs('DecodedContent'), '\u0000'''
  • replace(outputs('DecodedContent'), '\x00'''), 
  • replace(outputs('DecodedContent')'\0'''), 
  • replace(outputs('DecodedContent'), '\r'''), 
  • replace(string(outputs('DecodedContent')), '\n''')

6. Splitting the string also does not work completely:

split(string(concat('{', first(split(last(split(outputs('DecodedContent'), '{')), '}')), '}')), ',')
output: Vitss_2-1707377876402.png

 

 

 

So the first split does not work, there is no split action based on the comma ',' but the concat function containing two working split functions based on the '{' and '}' character.

 

I do not have a clue anymore what I can possibly do to solve this issue.

Any ideas are welcome

Thank you

Categories:
I have the same question (0)
  • Verified answer
    Vitss Profile Picture
    334 on at

    Double question due to spam notation:

    Re: Replace function refusing to work for null (\u... - Power Platform Community (microsoft.com)

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 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard