cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Unable to parse JSON from Adobe Sign form data

Hello,

 

I am customizing this Adobe Sign template to get the form data, JSON parse it and map it to an Excel file. 

 

It works great until there are line breaks in the data from multiple line text fields.  

 

Please help me.

 

1. Here is a snippet sample of the form output data.  Everything works fine until there is line breaks.
Ex:  

NINE

EIGHT

SEVEN

SIX

 

 

 

 

"APPROVER","Tony","Eei","Analyst","TonyEei","3","4","3","3","2","4","4","SDFSD","SDFS","NINE
EIGHT
SEVEN
SIX","SDDS"

 

 

 

 

 

2. When I try to input it into  Parse JSON it doesn't work and I am unable to map the values to my Excel file.

 

 

 "role": "APPROVER",
      "first": "Tony",
      "last": "Eei",
      "title": "Analyst",
      "company": "TonyEei",
      "CE1": "3",
      "CE2": "4",
      "CE3": "3",
      "CE4": "3",
      "CE5a": "2",
      "CE5b": "4",
      "CE_Total": "4",
      "Comment_OrgComms": "SDFSD",
      "Comment_QueryResponse": "SDFS",
      "Comments_AssetMix": "NINE"
    },
    {
      "completed": "EIGHT"
    },
    {
      "completed": "SEVEN"
    },
    {
      "completed": "SIX",
      "email": "SDDS",

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Hi @imcoDev 

 

Carriage returns are not valid inside of JSON so you must be escaped. You could do something like this and it should make it valid:

 

JsonCRLF.PNG

 

The replace expression in the compose action will replace all carriage return line feeds with escaped versions. So your original text then becomes:

 

"APPROVER","Tony","Eei","Analyst","TonyEei","3","4","3","3","2","4","4","SDFSD","SDFS","NINE\r\nEIGHT\r\nSEVEN\r\nSIX","SDDS"

 

The expression text from above is:

 

replace(variables('formData'),variables('crlf'), '\r\n')

 

 

View solution in original post

2 REPLIES 2
Highlighted
Memorable Member
Memorable Member

Hi @imcoDev 

 

Carriage returns are not valid inside of JSON so you must be escaped. You could do something like this and it should make it valid:

 

JsonCRLF.PNG

 

The replace expression in the compose action will replace all carriage return line feeds with escaped versions. So your original text then becomes:

 

"APPROVER","Tony","Eei","Analyst","TonyEei","3","4","3","3","2","4","4","SDFSD","SDFS","NINE\r\nEIGHT\r\nSEVEN\r\nSIX","SDDS"

 

The expression text from above is:

 

replace(variables('formData'),variables('crlf'), '\r\n')

 

 

View solution in original post

Highlighted

@Paulie78  Thank you this allowed me to replace the line breaks with valid inputs.  

However, I need to figure out how to keep the line breaks when inserting the JSON items into an Excel row.  I will start another thread about that.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (2,133)