<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/discussions/f/data/11265/how-to-remove-carriage-return-from-string-while-inserting-into-database</link><description>Hi All, 
 
 We are using Portal designed forms and we have a requirement to get Feedback from Customer and it is a Paragraph Field. 
 Since it is a Paragraph Field, customers are giving Feedback in the form of new lines, like below 
 Hi 
 This is a Requirement</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/69958?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2019 05:46:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0e476f9b-778d-48df-9e7b-6c3492c483e5</guid><dc:creator>rameshb851</dc:creator><description>&lt;p&gt;Hi Somesh,&lt;/p&gt;
&lt;p&gt;Can you tried below code&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1571204845331v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/69954?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 19:58:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6fe6a248-991d-4bb1-b2a4-c14c7f4f10e7</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;I made a slight modification to&amp;nbsp;replace the line breaks with spaces to avoid having words stuck together.&lt;/p&gt;
&lt;p&gt;Basically you can just create a rule with &amp;quot;text&amp;quot; as a rule input and just paste this in.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(  
  local!textAscii:code(ri!text),
  trim(
    joinarray(
      char(
        updatearray(
          local!textAscii,
          wherecontains(
            tointeger(10, 13, 9),
            local!textAscii
          ),
          32
        )
      ),&amp;quot;&amp;quot;
    )
  )
)
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/64165?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 17:31:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de1eddc8-e640-4590-8c01-ccfba7938bf1</guid><dc:creator>John Stretton</dc:creator><description>If you install the Appian Regular Expression Functions plugin, you can write a VERY simple expression rule to trim whitespace:&lt;br /&gt;
&lt;br /&gt;
regexreplaceall(&amp;quot;^[\s]+|[\s]+$&amp;quot;,ri!text,&amp;quot;&amp;quot;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/49520?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 17:14:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dfc85d97-6c89-4b57-8835-e51ca2e0ef23</guid><dc:creator>Mike Schmitt</dc:creator><description>Just be advised that both char(13) and char(10) are used for line breaks depending on the type of form (portal vs. tempo or sail); last I checked, portal forms actually submit BOTH char(13) and char(10) with each linebreak, whereas tempo/sail uses only char(10).  (I could be slightly off, it&amp;#39;s been a while since I last dealt with this, but it was something very close to this at least).&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m not sure if you&amp;#39;re seeing different results or not, but you might need to check and account for this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/49502?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 06:45:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b37734bc-cc83-401f-9527-fefeff793804</guid><dc:creator>someshwarp</dc:creator><description>Hi,&lt;br /&gt;
As I told initially when I was using only this expression difference(split(pv!rejectionDetails.rejectionInfo,char(13)),{char(13)}) there were commas, but when i used joinarray on top of it with separator as null, it removed comma as well.&lt;br /&gt;
I tested this in my system and is working without any issue.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/49500?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 06:40:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3ea7b8bb-5323-41c9-9dea-bac4bdf20187</guid><dc:creator>Vinay Kumar Rai</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If user enter tab, the above expression doesn&amp;#39;t work, you also need to remove the TABs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/49499?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 06:37:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93549bef-2427-40a9-b013-ec0ce3c5cbf4</guid><dc:creator>someshwarp</dc:creator><description>Hi Vinay,&lt;br /&gt;
&lt;br /&gt;
Thank you for your reply.&lt;br /&gt;
I am able to solve this by writing an expression, which is similar as you suggested.&lt;br /&gt;
The expression is &lt;br /&gt;
&lt;br /&gt;
joinarray(difference(split(pv!rejectionDetails.rejectionInfo,char(13)),{char(13)}),&amp;quot; &amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Thank you once again&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove Carriage Return from String while inserting into database</title><link>https://community.appian.com/thread/49498?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 06:20:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:489213a1-3187-4501-a2f6-52eec26ebed8</guid><dc:creator>Vinay Kumar Rai</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;=load(
  local!AscIICode:code(&amp;quot;Hi,
                     This is a Requirement
                     Here is a issue
                     We have to solve&amp;quot;),
                   
  trim(
    joinarray(
      char(
        remove(
          local!AscIICode,
          wherecontains(
            tointeger(10,13,9), /* Characters to remove */
            local!AscIICode
          )
        )
       ),&amp;quot;&amp;quot;
      )
    )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Try CODE function, it converts the characters into Unicode&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>