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 / 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

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