How to add a text delimiter in a csv file created in Logic app?

Kapoor, Aastha (NBCUniversal) 1 Reputation point
2021-02-11T22:34:26.993+00:00

I am converting a Json file to a Csv using "Create CSV table" action in a Logic App.
The csv uses a ',' as a field delimiter but I also Want to use a Double Quote around the fields which have a "," in their text value as well.
Basically, add a double quote as the text delimiter.

I have tried by concating a double quote with the text value but it ends up returning the text value as """TEXT HERE""" instead of just "TEXT HERE" that I am looking for.
Has someone else found a way to do this.

67163-image.png

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,249 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,731 Reputation points
    2021-02-12T11:35:06.16+00:00

    Hi @Kapoor, Aastha (NBCUniversal)

    Looks like either your json might have double quotes in the value of json field or you are using concat as I can see in the Value of Tile Name and Episode Name.

    [  
      {  
        'city': 'myCity',  
        'name': '"fName, mName lName"'  
      }  
    ]   
    

    concat('"',item()['Title Name'],'"')
    concat('"',item()['Episode Number'],'"')

    The parser will add the double quotes if there are special characters ',' in any of the values. You don't have to use concat.

    Input:

    [  
      {  
        'city': 'myCity',  
        'name': '"fName, mName lName"'  
      }  
    ]   
    

    Output:

    city,name
    myCity,"fName, mName lName"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.