<?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>Remove a group from a group constant in a rule</title><link>https://community.appian.com/discussions/f/rules/17598/remove-a-group-from-a-group-constant-in-a-rule</link><description>Hi all, 
 I&amp;#39;m using the below rule to retrieve all the group members from a group constant and then exclude one of the groups from the same group constant. Below code with remove() function is not working. Could anyone please help how do I exclude a group</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Remove a group from a group constant in a rule</title><link>https://community.appian.com/thread/69370?ContentTypeID=1</link><pubDate>Fri, 13 Sep 2019 05:47:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e35b0bb4-d60f-430c-beb7-737af7b05e5e</guid><dc:creator>sreedevij</dc:creator><description>&lt;p&gt;Hi Kumar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The ac or pv you are mapping the expression to, should be of group(list) type as your expression&amp;#39;s output will be group(list).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Otherwise, you can use&amp;nbsp;todatasubset(local!dash)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sree Devi Jayakumar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove a group from a group constant in a rule</title><link>https://community.appian.com/thread/69369?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2019 23:54:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:181930c4-6d53-4bce-9a6f-3be62c9b119c</guid><dc:creator>Meena Kumari</dc:creator><description>&lt;p&gt;Hi Sreedevi, as a continuation of above , I&amp;#39;m trying to pass the above rule in a script task node input as a data subset. it is giving me below error:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Error: Invalid Cast: Cannot cast from type &amp;#39;Group&amp;#39; to type &amp;#39;DataSubset&amp;#39; (Data Inputs).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Request you to please suggest how to convert the output of above rule so that I can pass it as a subset?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove a group from a group constant in a rule</title><link>https://community.appian.com/thread/69365?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2019 17:22:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0149c2e5-3b00-4ac0-bf80-44624e21c5d9</guid><dc:creator>Meena Kumari</dc:creator><description>&lt;p&gt;Thanks a lot Sree Devi&amp;nbsp;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f600.svg" title="Grinning"&gt;&amp;#x1f600;&lt;/span&gt; it worked.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove a group from a group constant in a rule</title><link>https://community.appian.com/thread/69363?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2019 17:08:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:efb36bd9-2fcb-40af-858e-956b7a631e8c</guid><dc:creator>sreedevij</dc:creator><description>&lt;p&gt;Hi Kumar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try the below.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;load(&lt;br /&gt;local!approvers: a!groupMembers(&lt;br /&gt;group: CONS!ARC_GROUP_APPROVERS,&lt;br /&gt;direct: true,&lt;br /&gt;memberType: &amp;quot;GROUP&amp;quot;&lt;br /&gt;),&lt;br /&gt;local!dash: remove(&lt;br /&gt;local!approvers.data,&lt;br /&gt;wherecontains(cons!ARC_GROUP_SAFETY_PLATFORM,togroup(local!approvers.data))&lt;br /&gt;),&lt;br /&gt;local!dash&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sree Devi Jayakumar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove a group from a group constant in a rule</title><link>https://community.appian.com/thread/69362?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2019 16:39:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:acceb181-3ea3-4335-8c53-c5222912b817</guid><dc:creator>Meena Kumari</dc:creator><description>&lt;p&gt;Thank you for the reply &lt;a href="/members/sreedevij"&gt;sreedevij&lt;/a&gt; When I run your suggested code I&amp;#39;m getting the below error:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Expression evaluation error at function &amp;#39;wherecontains&amp;#39; [line 9]: Invalid types, can only act on data of the same type (DataSubset, Group)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Can you please suggest?&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove a group from a group constant in a rule</title><link>https://community.appian.com/thread/69354?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2019 07:51:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81bfdb72-ea3c-4fb6-9a5a-78718130ffbb</guid><dc:creator>sreedevij</dc:creator><description>&lt;p&gt;Hi Kumar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Remove function&amp;#39;s second parameter is an index(not a value itself) of the array which is a first parameter. So I hope the below code will work for you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;load(&lt;br /&gt; local!approvers: a!groupMembers(&lt;br /&gt; group: CONS!ARC_GROUP_APPROVERS,&lt;br /&gt; direct: true,&lt;br /&gt; memberType: &amp;quot;GROUP&amp;quot;&lt;br /&gt; ),&lt;br /&gt; local!dash: remove(&lt;br /&gt; local!approvers,&lt;br /&gt; wherecontains(local!approvers,cons!ARC_GROUP_SAFETY_PLATFORM)&lt;br /&gt; ),&lt;br /&gt; local!dash&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sree Devi Jayakumar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>