<?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 pull email address of the users who are part of any specific Appian group.</title><link>https://community.appian.com/discussions/f/new-to-appian/28430/how-to-pull-email-address-of-the-users-who-are-part-of-any-specific-appian-group</link><description>Hi, 
 I was able to pull list of users from the group call &amp;quot;AA ADMIN&amp;quot; by using a contact &amp;quot;AA_ADMIN&amp;quot;. 
 Now, is there a way I can pull the email addresses of these users. 
 Any advises please.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to pull email address of the users who are part of any specific Appian group.</title><link>https://community.appian.com/thread/111456?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 12:01:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:106e6ccd-b83f-4dd0-bd2f-162bc1682d76</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;if &amp;quot;rule!AA_getMembers()&amp;quot; is performing a query, then the data it returns will be wrapped in the &amp;quot;list of variant&amp;quot; type, regardless of whether certain fields are plaintext or not.&amp;nbsp; The first thing to try would be the code suggestion Gopalk already posted, which basically wraps the &amp;quot;email&amp;quot; query results in the &amp;quot;emailAddress&amp;quot; data type first, and does the same with the Admin Emails list, before trying to union them together.&amp;nbsp; Another technique to cast an array of any type (string) to an array of text is to (alternatively) wrap it in &amp;quot;toUniformString()&amp;quot;, which handles an array of text.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pull email address of the users who are part of any specific Appian group.</title><link>https://community.appian.com/thread/111391?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 05:25:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af0adea8-2516-463d-937d-735bc4525bd9</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;HI&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/swapnar6405"&gt;swapnar6405&lt;/a&gt;, Can you try below updated code?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!membersEmail: toemailaddress(index(
    rule!AA_getMembers(
      key: {1,2,10},
    ),
    &amp;quot;email&amp;quot;
  )),

  local!adminUsers: a!groupMembers(group: cons!AA_ADMIN, memberType: &amp;quot;USER&amp;quot;),
  local!adminUsersEmail:toemailaddress(a!forEach(
    local!adminUsers,
    user(fv!item, &amp;quot;email&amp;quot;)
  )),
  local!emailList: union(
      local!membersEmail,
      local!adminUsersEmail,
    ),
  local!emailList
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pull email address of the users who are part of any specific Appian group.</title><link>https://community.appian.com/thread/111384?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 01:49:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6bfff54-1afd-470c-9b50-04a511979896</guid><dc:creator>swapnar6405</dc:creator><description>&lt;p&gt;Mike,&lt;/p&gt;
&lt;p&gt;I would like to concatenate of email address of two different variables.&amp;nbsp;When I try to perform union of two local variables, I am encountering an issue.&lt;/p&gt;
&lt;p&gt;First local variable &amp;quot;local!membersEmail&amp;quot; of type &amp;quot;&lt;span&gt;List of Variant&amp;quot; and second&amp;nbsp;variable &amp;quot;adminUsersEmail&amp;quot; is of type List of Text String.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is it advisable to convert first variable to tostring()&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!membersEmail: index(
    rule!AA_getMembers(
      key: {1,2,10},
    ),
    &amp;quot;email&amp;quot;
  ),

  local!adminUsers: a!groupMembers(group: cons!AA_ADMIN, memberType: &amp;quot;USER&amp;quot;),
  local!adminUsersEmail: a!forEach(
    local!adminUsers,
    user(fv!item, &amp;quot;email&amp;quot;)
  ),
  local!emailList: toemailaddress(
    union(
      local!membersEmail,
      local!adminUsersEmail,
    )
  ),
  local!emailList
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pull email address of the users who are part of any specific Appian group.</title><link>https://community.appian.com/thread/111378?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2023 21:21:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6f5a61eb-635d-4864-9162-ce1c4e5215db</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;d prefer the newer OOB function, &lt;em&gt;a!groupMembers()&lt;/em&gt;...&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!userList: a!groupMembers(
    group: cons!AA_ADMIN,
    memberType: &amp;quot;USER&amp;quot;
  ),
  
  a!forEach(
    local!userList,
    user(fv!item, &amp;quot;email&amp;quot;)
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>