<?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>Comparing groups using union</title><link>https://community.appian.com/discussions/f/general/33935/comparing-groups-using-union</link><description>Hello, 
 I have an application with users that have multiple groups that describe their roles and teams. I have a group type that specifically targets which team a person is on. I have a pointer to that type. 
 I want to get a member of another role </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Comparing groups using union</title><link>https://community.appian.com/thread/128774?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 14:22:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2cc77385-e402-431b-8e42-961e8dc17bc6</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Yeah, the issue here is that groupsbytype returns a datasubset, while groupsforuser directly returns a list of groups. The data field inside the datasubset is always wrapped into a variant type. This is a historical inconsistency.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Comparing groups using union</title><link>https://community.appian.com/thread/128773?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 14:09:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2fa5fb44-85e2-4b83-b3b8-49980088beec</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Just tried and it looks like the output for both of these functions are different. One gives a list of variants vs the other gives a list of groups.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1706882933253v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Comparing groups using union</title><link>https://community.appian.com/thread/128772?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 14:03:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:546cf49c-dfdb-41aa-a74b-8cd7658cb3c7</guid><dc:creator>erazemk6135</dc:creator><description>&lt;p&gt;Thank you. Regarding my question about the type, is documentation missing about the type of the result of these two methods? Because in the documentation it seems to me both are of the same type.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Links:&lt;br /&gt;&lt;a id="" href="https://docs.appian.com/suite/help/23.4/fnc_people_a_groupsbytype.html"&gt;https://docs.appian.com/suite/help/23.4/fnc_people_a_groupsbytype.html&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a id="" href="https://docs.appian.com/suite/help/23.4/fnc_people_a_groupsforuser.html"&gt;https://docs.appian.com/suite/help/23.4/fnc_people_a_groupsforuser.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Comparing groups using union</title><link>https://community.appian.com/thread/128770?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 13:49:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce3d28aa-d927-4c73-ba7a-d92cb13bffdc</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Just wrap both of the parameters in togroup()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;union(
  togroup(
    a!groupsByType(cons!TA1_ProjectTeamsPointer).data
  ),
  togroup(a!groupsForUser(&amp;quot;testuser&amp;quot;))
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>