Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly update Textarea field with Line Break via REST API

Pat L_
Contributor
January 3, 2023

I have an issue with updating  Textarea field with Line Break via REST API. 

For example, if I update a field via API like this: (%0A is the URL encode of linebreak)

/ajax/confiforms/rest/update.action?pageId=1234&f=formname&q=entrynumber:1&fv=text:Line1Content%0ALine2Content

The tableview will not show the linebreak: it displays it without linebreak. However, if I edit it, it does show the linebreak properly.

I tried to use [entry.text.replaceCRLFWithBR] & listview instead, it doesn't work either.

issue1.png

 

If I use the edit window to "save" the edit, the tableview will show the linebreak properly. 

- The top one below is the entry with "edit" window from tableview.

- The bottom one below is the entry updated via REST API.

issue2.PNG

 

Any idea what I should do to fix the issue? May I should pass something else as linebreak for REST API instead of %0A? 

Thank you.

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
January 4, 2023

Hi

Try the %0d instead

Alex

Pat L_
Contributor
January 4, 2023

Excellent answer. Thank you again for the prompt response and it saves me a lot of time trying to figure it out. @Alex Medved _ConfiForms_ You are awesome as always.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events