<?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>String array rule</title><link>https://community.appian.com/discussions/f/rules/19468/string-array-rule</link><description>Good Morning , I know it is not complex, but I cannot find the most optimal way. I have the following rule that I call from an interface. 
 
 But I need to return directly to the interface a string as follows. 
 20202,20203 
 Thank you very much</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76153?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 13:20:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4c5557f4-7d56-44c6-a832-cebb7e1ac39c</guid><dc:creator>alexc0002</dc:creator><description>&lt;p&gt;Thanks, i used the split function, it seems to work fine. Once again thanks for your time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76150?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 11:36:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7f328b71-51cc-46a6-9d92-246ece0b9b7f</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;If the data types are different you can coerce (cast) one or both of them to be the same type before applying the operator.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76149?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 11:18:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1fadbe37-2cd3-4eae-8aaa-5688b5fa677d</guid><dc:creator>alexc0002</dc:creator><description>&lt;p&gt;Yes, it is clear that it is due to the data type. In the first image you can see on the right the result of the first rule which is List of text string, which I think is the one needed by the IN operator&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76148?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 11:04:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f13ebb1-12f7-4204-be00-e86e4954b9e6</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;When you run &amp;#39;SAN_ST_GetListAssetsByPortfolio&amp;#39; what type of data does that return? The error message is saying you can&amp;#39;t use the &amp;#39;IN&amp;#39; operator (which will always be a list) to compare the field &amp;#39;securityMaster&amp;#39; to the values returned by this rule.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76147?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 10:44:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3932b918-b2a9-46fd-aa14-4a56a7c9f564</guid><dc:creator>alexc0002</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry Stewart&lt;br /&gt;Another question, at the end the first rule that obtains the values ​​I left it as in the first img&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1598438511284v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Because the results of the rule I need to put using the in operator in another rule, but it shows me the following error.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1598438318351v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76146?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 08:33:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:63d4e63e-abd7-4cd0-8917-dd15a1848a39</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You&amp;#39;re welcome. Half the battle in Appian is trying to find the right functions, and the other half is breaking down your problem into a set of smaller problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76145?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 08:30:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:98d8c951-0856-4472-aa04-5abda26e46a6</guid><dc:creator>alexc0002</dc:creator><description>&lt;p&gt;Thank you very much for your time Stewart, it works perfectly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: String array rule</title><link>https://community.appian.com/thread/76144?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 08:21:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e0fa89a2-8dc8-4d9d-8abe-972bfb99331f</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Hi Alex&lt;/p&gt;
&lt;p&gt;A two-step process will give you what you need:&lt;/p&gt;
&lt;p&gt;Step 1: use fn!index() to extract the actual values&lt;/p&gt;
&lt;p&gt;Step 2: use fn!joinarray() to splice the values together with the separator of your choice&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!myArray: {
    {idSecurityMaster: 20202},
    {idSecurityMaster: 20203}
  },
  fn!joinarray(
    fn!index(local!myArray,&amp;quot;idSecurityMaster&amp;quot;),
    &amp;quot;,&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve NOT included any handling for circumstances where the values maybe null, or the array returned doesn&amp;#39;t contain any &amp;#39;idSecurityMaster&amp;#39; dictionary items...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>