web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : ZKylPuyuUfH6y6E7qYG+N+
Power Automate - Building Flows
Unanswered

Adding double quotes to string value produces three double quotes instead of one

Like (0) ShareShare
ReportReport
Posted on 9 Sep 2022 16:15:18 by 9

*Edit - found a solution!  I wound up running the output through another replace to clean up the added quotes in the end prior to writing to the CSV file (lots of digging through the forums here led me to the solution).

 

-----------------

 

Racking my brain on this one, I've tried every string manipulation tactic I can think of in the flow, but it's not working right.

 

I have a CSV file that I upload to SharePoint with four columns, very basic, all string data (first name, last name, ID number, status), and then I have a MS Form that collects the same information and adds it to a separate SharePoint list.

 

My flow grabs the file from a local file share and uploads it, then processes it into JSON data in order to allow me to merge it with the contents from the separate list, then create a new CSV file in the end which then gets emailed to a few users for a separate business process (it's a fast process compared to a regular CSV parse, so all of this works).

 

The issue is when I'm processing the list data to add it to the new CSV file.

 

I'm using a 'get items' to grab the content from the list, then an 'apply to each' to process each item and the value from each field and then add item to the CSV file...very standard.

img1.jpeg

This again is working, but I need to add double-quotes around the last value (Status Value) to have it formatted to match the already existing data in the original CSV file.

 

Without any string manipulation, the data comes in as:

 

Example: (First Name, Last Name, ID Number, Status Value)

 

Eric,Smith,WD12345,Student

 

What I'd like is to have it formatted as:

 

Eric,Smith,WD12345,"Student"

 

Every time I try to add quotes into the string for that value, it comes out with three sets of double quotes instead of just one set.

 

Example:

 

Eric,Smith,WD12345,"""Student"""

 

I've tried adding in the quotes directly in the AddItem section

I've tried in expressions using concat variations, substitutions, compose statement to add it as output, URL decoding, replace statements...and so many combinations of each in separate or nested versions...

 

 

 

concat('"', item()?['Status/Value'], '"')

concat(outputs('addQuote'), item()?['Status/Value'], outputs('addQuote'))

substitute(concat(outputs('addQuote'), item()?['Status/Value'], outputs('addQuote')), '\"')

concat(decodeUriComponent('%22'), item()?['Status/Value'], decodeUriComponent('%22'))

replace(item()?['Status/Value'],'"""','"')

 

 

 

Nothing really seems to be working.  Either it doesn't have a double quote at all, or any version that does manage to add them in always seems to add it in triplicate!

 

If anyone has an idea of how to do this, I'd really appreciate the help.

 

All I want is to surround one string (Status Value) with double quotes, it should be easy, just basic string manipulation, but for some reason it's not being easy.

 

I can post more screenshots, peeks at code, whatever may be helpful.

 

Thanks!

I have the same question (0)
  • Jon_vB Profile Picture
    37 on 05 Aug 2025 at 17:20:59
    Adding double quotes to string value produces three double quotes instead of one
    I couldn't get the OP's solution to work (replacing """ with ") because I have an array of arrays, and that was a hassle.  So, I went back to trying to solve the issue.  My issue was that I was trying to insert an integer into a Sharepoint column configured as String (because sometimes the value has letters, but, sometimes it is all numeric).
     
    Here's what ended up working for me... 
    if(empty(string(item()?['VisitIdentifier'])), '', concat('', string(item()?['VisitIdentifier']),''))
     
    it is basically concatenating an empty string to the field.  (and the If statement to deal with nulls)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 798 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 469 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 333

Last 30 days Overall leaderboard
Loading complete