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 / How to add double quot...
Power Automate
Unanswered

How to add double quotes to a string

(0) ShareShare
ReportReport
Posted on by 68

Hi there, 

 

I'm getting a bunch of string values from a stored proc from SQL Server, I'm just trying to add double quotes to a couple of strings from the result set. 

let's say I'm getting a string like so; TEST so to this string I'm trying to add double quotes like this "TEST".

 

If I add the double quotes in the source, so the string would come in as "TEST", flow just add more quotes to it like this """TEST"""

 

Thanks for your help!

 

Categories:
  • cchannon Profile Picture
    4,702 Moderator on at

    How are you trying to use this string that "flow just add more quotes" and did you deliberately put three sets of quotes on each side of that second example, or was it supposed to be 2? That is, did you mean """TEST""" or ""TEST""?

  • MidwayC11 Profile Picture
    68 on at

    This is an example what I'm trying to do;

    MidwayC11_0-1627776223083.png

     

    I'm trying to just add double quotes to strings in the Compose with replace, when I run the flow nothing gets added to the string in the Compose 2 strings.

     

  • MidwayC11 Profile Picture
    68 on at

    1

  • cchannon Profile Picture
    4,702 Moderator on at

    Yeah, that is not how Replace works. It takes a literal character search string, finds that string everywhere in the input and replaces it with a literal character replacement string.

     

    If you're trying to wrap the entire string in one set of quotes, you just want to have a new Compose that is something along the lies of

    '"' + Compose1 + '"'

    (or you can use string append operator, but the addition character should work fine for string building)

     

    If you're trying to wrap each member of the comma separated list in quotes, you'll need to be slightly more elaborate. Something along these lines this ought to do the trick: 

    '"'+ Replace(Compose1, ', ', '", "') + '"'

     

  • MidwayC11 Profile Picture
    68 on at

    thanks for replying to my post. somehow I'm trying to build that string taking your example, but somehow the 

    expression is complaining that's an invalid expression.

     

  • cchannon Profile Picture
    4,702 Moderator on at

    Yes. I think maybe you should consider some basic string manipulation instruction or courses. You should get an understanding of what a string is and how you work with it before you continue.

  • MidwayC11 Profile Picture
    68 on at

    Thanks but I know what a "String" is, I'm trying to get some help on how to manipulate it in power automate that seems to be finicky with strings. Manipulating strings with SQL is easy or C# as well but this is my first time that I'm trying to manipulate string with this tool, that's why I'm looking for some help.

  • cchannon Profile Picture
    4,702 Moderator on at

    Sorry to have offended. I think I confused your reply with a different email notification.

     

    OK, so yes, you will get 'invalid expression' message from pasting my suggestion because I just wrote it off the top of my head. I am not in your flow, therefore I do not have the object model of your flow.

     

    You need to write something along those lines in your flow, so:

     

    • IF you start with Test, Test and want "Test, Test" then use
      • '"' + 'Test, Test' + '"'
    • IF you start with Test, Test and want "Test", "Test" then use
      • '"'+ Replace('Test, Test', ', ', '", "') + '"'

    Obviously, you need to put your parameter name in there instead of Test, Test

  • MidwayC11 Profile Picture
    68 on at

    All good, none taken here. Was just trying to clarify things. Thanks so much for your help, I'll give this a try!

  • MidwayC11 Profile Picture
    68 on at

    Hi there, 

     

    So when I write the 

    • '"'+ Replace('Test, Test', ', ', '", "') + '"' into the Expression field, it keep saying that's an invalid string. I tested with SQL and its perfectly fine. 

    MidwayC11_0-1628041631636.png

     

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard