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 Apps / how to escape special ...
Power Apps
Answered

how to escape special characters in POST json body defined via custom connectors?

(0) ShareShare
ReportReport
Posted on by 29

Hope we get some clue on the problem below.. We have succeeded,

1. creating a custom connector to POST to solr database outside azure.

2. and tested the API on the custom connector through 200 success with correct a response. The successful json request body looks like this on custom connector's "test" tab;

when "raw body toggle button" is on => "{ \"solr_query\": \"text_headline: today is a sunny day\" }" 

when "raw body toggle button" is off => { "solr_query": "text_headline: today is a sunny day" }

 

But, when we go back to canvas app and put a button with the below function. It fails with limited error message.

Set(var_parts_solr_records,solrCallFunctionApi("text_headline: today is a sunny day"))

 

I'm assuming there should be some automated interpretation of ":" even in "string" area. Some workaround of escaping the character would be very appreciated!  

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @SunnyTokyo 

    You might want to consider using the EncodeUrl function on your text to help in your scenario.

    Beyond that, you would need to utilize the substitute function to make specific changes in the text.

     

    I hope this is helpful for you.

     

  • Verified answer
    Prakash4691 Profile Picture
    1,332 on at

    Hi @SunnyTokyo ,

     

    Try, Text("text_headline: today is a sunny day")

     

     

    Regards,

    Prakash

  • SunnyTokyo Profile Picture
    29 on at

    @Rani @Prakash4691  thank you for the reply. We tried the both and were helpful on the topic. One thing I noticed was when we post double quate("") or backslash(\) from powerapps to flow or to logic apps even in the json body text area, it causes automatic adding of some escaping strings. So we switched the whole idea into substituting all the "\" into "/" until we finally need to utilize the original string. Looks like it's JSON side restriction.

  • gy2023 Profile Picture
    2 on at

    maybe this tools will be helpful as well URL ENCODE ONLINE

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard