<?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>Substitute function string issue</title><link>https://community.appian.com/discussions/f/general/17109/substitute-function-string-issue</link><description>i wish to replace/substitute &amp;quot;[&amp;quot;, &amp;quot;]&amp;quot; with &amp;quot; &amp;quot; in string received below 
 &amp;quot;&amp;quot;param&amp;quot;:[{&amp;quot;key1&amp;quot;:&amp;quot;value1&amp;quot;,&amp;quot;key2&amp;quot;:&amp;quot;value2&amp;quot;}, {&amp;quot;key3&amp;quot;:&amp;quot;value3&amp;quot;,&amp;quot;key4&amp;quot;:&amp;quot;value4&amp;quot;}]&amp;quot; 
 
 substitute(&amp;quot;&amp;quot;param&amp;quot;:[{&amp;quot;key1&amp;quot;:&amp;quot;value1&amp;quot;,&amp;quot;key2&amp;quot;:&amp;quot;value2&amp;quot;}, {&amp;quot;key3&amp;quot;:&amp;quot;value3&amp;quot;,&amp;quot;key4&amp;quot;:&amp;quot;value4&amp;quot;}]&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67495?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 12:58:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fbe49f6f-0318-40dc-9d93-9451b10ca6e4</guid><dc:creator>TejaAppian</dc:creator><description>&lt;p&gt;This was the use case i was working on vivek&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/discussions/f/general/15002/nested-json-via-integration-object-on-to-a-paging-grid-error"&gt;community.appian.com/.../nested-json-via-integration-object-on-to-a-paging-grid-error&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67487?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 09:07:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c49e010a-bedf-4b32-b682-cfcc9f2e6b69</guid><dc:creator>viveku3486</dc:creator><description>&lt;p&gt;Hey Teja,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Lets do this, As far as I can understand you are receiving a json text and from that you want to blank out the &amp;quot;[&amp;quot;. Is it so? If yes then can you please tell us the exact use case which you want to achieve ? Because instead of doing this hard cord logic, We can go for other functions that will help you to extract Json values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67481?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 20:06:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f76cf035-0b02-43d6-ac6c-65fe78d90698</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;seems to work for me - remember you need to enclose your local variable in with() or load() or a!localVariables() which it looks like you may have missed.&amp;nbsp; here&amp;#39;s my result:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1560888402094v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;and here&amp;#39;s my code:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;with(
  local!string: local!string: &amp;quot;&amp;quot;&amp;quot;param&amp;quot;&amp;quot;:[{&amp;quot;&amp;quot;key1&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value1&amp;quot;&amp;quot;,&amp;quot;&amp;quot;key2&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value2&amp;quot;&amp;quot;}, {&amp;quot;&amp;quot;key3&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value3&amp;quot;&amp;quot;,&amp;quot;&amp;quot;key4&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value4&amp;quot;&amp;quot;}]&amp;quot;,
  
  substitute(local!string, &amp;quot;[&amp;quot;, &amp;quot; &amp;quot;)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67480?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 20:02:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e383957-0ec5-42fc-8ccd-802c5bebe1d0</guid><dc:creator>TejaAppian</dc:creator><description>&lt;p&gt;actually tried that it didn&amp;#39;t work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67479?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 20:01:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f1a0a361-af3e-439f-acaf-72fb9a758c2c</guid><dc:creator>TejaAppian</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1560888099992v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67477?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 18:57:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3f0aacc-001c-405c-beb1-ac33ebc3f436</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;your input string still isn&amp;#39;t formatted properly.&amp;nbsp; the proper way to create double-quotes inside an Appian string is to put 2 sets of double quotes.&amp;nbsp; this added to needing single-quotes surrounding your string.&amp;nbsp; it gets pretty confusing.&amp;nbsp; you might try inserting your desired string value as the &amp;quot;value&amp;quot; portion of an input parameter and seeing what happens then.&lt;/p&gt;
&lt;p&gt;as far as i can tell, this should work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;local!string: &amp;quot;&amp;quot;&amp;quot;param&amp;quot;&amp;quot;:[{&amp;quot;&amp;quot;key1&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value1&amp;quot;&amp;quot;,&amp;quot;&amp;quot;key2&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value2&amp;quot;&amp;quot;}, {&amp;quot;&amp;quot;key3&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value3&amp;quot;&amp;quot;,&amp;quot;&amp;quot;key4&amp;quot;&amp;quot;:&amp;quot;&amp;quot;value4&amp;quot;&amp;quot;}]&amp;quot;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67476?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 18:01:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e0e7ff56-e4c4-4689-b358-b1ef75e58c3b</guid><dc:creator>TejaAppian</dc:creator><description>&lt;p&gt;Tried it No Good result vivek. it is returning null.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1560880870103v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67472?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 15:18:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6d14e2e-bc5e-4873-bc5e-8928dd9be141</guid><dc:creator>viveku3486</dc:creator><description>&lt;p&gt;Each and every item under &amp;quot; &amp;quot; is considered as a separate string. That&amp;#39;s why you are getting error which says signature length does not match.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One more thing you can do here is to convert your parameter into string first, Like below&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;substitute(tostring(&lt;span&gt;&amp;quot;&amp;quot;param&amp;quot;:[{"key1":"value1","key2":"value2"}, {"key3":"value3","key4":"value4"}]&amp;quot;),&amp;quot;[&amp;quot;,&amp;quot; &amp;quot;)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Substitute function string issue</title><link>https://community.appian.com/thread/67471?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 15:14:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c619eb2b-a83b-40d7-b461-8a97a46e0f5e</guid><dc:creator>viveku3486</dc:creator><description>&lt;p&gt;Hi Teja,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is because you are using &amp;quot;&amp;quot; multiple times in the string that you have used in substitute() function,&lt;/p&gt;
&lt;p&gt;If you will modify your text parameter like the below one. Then it works fine&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;substitute(&amp;quot;param:[{key1:value1,key2:value2}, {key3:value3,key4:value4}]&amp;quot;,&amp;quot;[&amp;quot;,&amp;quot; &amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>