<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/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>Group Identity Member AML</title><link>https://www.aras.com/community/f/development/3629/group-identity-member-aml</link><description>How can I add members to a group identity with AML code using Batch Loader?

I appreciate your comments.</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Group Identity Member AML</title><link>https://www.aras.com/community/thread/4927?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 21:37:57 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:062e1126-d8de-4c1f-89e2-aa2470923861</guid><dc:creator>neil.lindberg</dc:creator><description>&lt;p&gt;I was on here to try to find how to turn this into a server method, but here is how to add an existing identity as member to an identity. Just a different snippet that works for me. It does: Edit Identity / Add Member / Get Identity to add as member.&lt;/p&gt;
&lt;pre style="background:lightyellow;"&gt;&lt;code&gt;
&amp;lt;AML&amp;gt;
    &amp;lt;Item type=&amp;quot;Identity&amp;quot; action=&amp;quot;edit&amp;quot; where=&amp;quot;[identity].name=&amp;#39;All Employees&amp;#39;&amp;quot;&amp;gt;
      &amp;lt;Relationships&amp;gt;
          &amp;lt;Item type=&amp;quot;Member&amp;quot; action=&amp;quot;add&amp;quot;&amp;gt;
              &amp;lt;related_id&amp;gt;
                  &amp;lt;Item type=&amp;quot;Identity&amp;quot; action=&amp;quot;get&amp;quot;&amp;gt;
                      &amp;lt;name&amp;gt;test user&amp;lt;/name&amp;gt;
                  &amp;lt;/Item&amp;gt;
              &amp;lt;/related_id&amp;gt;
          &amp;lt;/Item&amp;gt;
      &amp;lt;/Relationships&amp;gt;
    &amp;lt;/Item&amp;gt;
  &amp;lt;/AML&amp;gt;
  
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Group Identity Member AML</title><link>https://www.aras.com/community/thread/1737?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 07:20:36 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:dabef865-8f4e-4001-abb3-9bae9ed557eb</guid><dc:creator>Klaus Wroblewski</dc:creator><description>Thanks Chris, the code works well!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Group Identity Member AML</title><link>https://www.aras.com/community/thread/1733?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 09:34:57 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:dcb221e2-f946-45c1-a763-03929309c905</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Klaus,

It is not possible to manually set the keyed_name of an item using the AML above; the keyed_name will always be set to the properties marked by the &lt;strong&gt;Keyed Name Order&lt;/strong&gt; column on an ItemType. If no properties are marked, the keyed_name will be set to the ID of the item. Because of this, searching on the keyed_name will not work unless you know the ID of the new item ahead of time.

Because the &lt;strong&gt;merge&lt;/strong&gt; action requires some criteria to be passed, I&amp;#39;d recommend using a where clause like below.

&lt;pre&gt;&lt;code&gt;&amp;lt;AML&amp;gt;
&amp;lt;Item type=&amp;quot;Member&amp;quot; action=&amp;quot;merge&amp;quot; where=&amp;quot;member.source_id = &amp;#039;@1&amp;#039; and member.related_id = &amp;#039;@2&amp;#039;&amp;quot;&amp;gt;
&amp;lt;source_id&amp;gt;@1&amp;lt;/source_id&amp;gt;
&amp;lt;related_id&amp;gt;@2&amp;lt;/related_id&amp;gt;
&amp;lt;/Item&amp;gt;
&amp;lt;/AML&amp;gt;&lt;/code&gt;&lt;/pre&gt;


Chris

&lt;hr /&gt;

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Group Identity Member AML</title><link>https://www.aras.com/community/thread/1731?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 09:20:30 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d151091e-c1e8-4176-986d-5634ab0a532c</guid><dc:creator>Klaus Wroblewski</dc:creator><description>Hi Chris,

the groups already exist and it could be that the member is already included. Currently when I run the AML the member is always added again. I have tried several variants, like this one, but none worked.

&amp;lt;Item type=&amp;quot;Member&amp;quot; where=&amp;quot;keyed_name=&amp;#39;@1&amp;#39;&amp;quot; action=&amp;quot;merge&amp;quot;&amp;gt;
&amp;lt;keyed_name&amp;gt;@1&amp;lt;/keyed_name&amp;gt;
&amp;lt;source_id&amp;gt;@1&amp;lt;/source_id&amp;gt;
&amp;lt;related_id&amp;gt;@2&amp;lt;/related_id&amp;gt;
&amp;lt;/Item&amp;gt;

So how to avoid that the member is added more times?

I appreciate your comments.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Group Identity Member AML</title><link>https://www.aras.com/community/thread/1427?ContentTypeID=1</link><pubDate>Fri, 16 Mar 2018 11:23:50 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2cc9e256-fec4-4b25-9479-d4eef4c7f204</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Klaus,

The simplest AML to accomplish this would look something like below if you already know the ID of the Group Identity and the member Identity.

&lt;pre&gt;&lt;code&gt;&amp;lt;AML&amp;gt;
&amp;lt;Item type=&amp;quot;Member&amp;quot; action=&amp;quot;add&amp;quot;&amp;gt;
&amp;lt;source_id&amp;gt;@1&amp;lt;/source_id&amp;gt;
&amp;lt;related_id&amp;gt;@2&amp;lt;/related_id&amp;gt;
&amp;lt;/Item&amp;gt;
&amp;lt;/AML&amp;gt;&lt;/code&gt;&lt;/pre&gt;


Chris

&lt;hr /&gt;

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>