cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SkiDK
Solution Sage
Solution Sage

File seperator '\' doubles in SP body

Hi all,

I have a flow that calls a stored procedure. One of the input parameters is the user like next "company\first.last"

When I run the stored procedure, it get result:

Capture.PNG

However when I call the stored procedure from Flow with the exact same parameter values, then I get nothing. I think the problem is with the '\' character, aka file separator. The inputted value in the connector is correct with one '\', but in the body suddenly is shown as a double '\\'. Thus the database will not find any records because it's a wrong value.

Capture.PNG

Is there a way to pass this clean, so that the '\' does not doubles?

Many thanks,

Ski

 

1 ACCEPTED SOLUTION

Accepted Solutions
SkiDK
Solution Sage
Solution Sage

Found the answer: https://www.freeformatter.com/json-escape.html#ad-output

'\' is one of the characters that are reserved in JSON, thus meaning if it's for a string they will be changed (or escaped) so to not disrupt the JSON structure. To use a single '\' in a string then, you need to reverse (or unescape) by writing '\\'.

Thus in my flow I need to add as input paramater 'company\\first.last' and the stored procedure will receive as 'company\first.last'.

View solution in original post

1 REPLY 1
SkiDK
Solution Sage
Solution Sage

Found the answer: https://www.freeformatter.com/json-escape.html#ad-output

'\' is one of the characters that are reserved in JSON, thus meaning if it's for a string they will be changed (or escaped) so to not disrupt the JSON structure. To use a single '\' in a string then, you need to reverse (or unescape) by writing '\\'.

Thus in my flow I need to add as input paramater 'company\\first.last' and the stored procedure will receive as 'company\first.last'.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (6,677)