filter the users

I am trying to filter the users with a method according to the group they belong to, the code that is below does not let me go from related_id, can you guide me?     <Item type="User" action="get"> <Relationships> <Item type="Alias" action="get"> <related_id> <Item type="Identity" action="get"> <Relationships> <Item type="Member" action="get"> <related_id> <Item type="Identity" action="get"> </Item> </related_id> </Item> </Relationships> </Item> </related_id> </Item> </Relationships> </Item>
Parents
  • Hello, I don't believe this kind of lookup is possible through a single AML query. I would recommend splitting this into two parts where you first get the Alias Identity of your user.
    <!-- Get the Alias Identity -->
    <Item type="User" action="get">
    <Relationships>
    <Item type="Alias" action="get" select="related_id(name)"/>
    </Relationships>
    </Item>
    
    <!-- Then get any group Identities that use this Identity -->
    <Item type="Identity" action="get">
    <Relationships>
    <Item type="Member" action="get">
    <related_id>YOUR_ALIAS_IDENTITY_ID</related_id>
    </Item>
    </Relationships>
    </Item>
    Alternatively, if this is a JavaScript method, you can use aras.getIdentityList();. This will return a comma-separated list of IDs representing all of the group Identities the currently logged in user belongs to. Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hello, I don't believe this kind of lookup is possible through a single AML query. I would recommend splitting this into two parts where you first get the Alias Identity of your user.
    <!-- Get the Alias Identity -->
    <Item type="User" action="get">
    <Relationships>
    <Item type="Alias" action="get" select="related_id(name)"/>
    </Relationships>
    </Item>
    
    <!-- Then get any group Identities that use this Identity -->
    <Item type="Identity" action="get">
    <Relationships>
    <Item type="Member" action="get">
    <related_id>YOUR_ALIAS_IDENTITY_ID</related_id>
    </Item>
    </Relationships>
    </Item>
    Alternatively, if this is a JavaScript method, you can use aras.getIdentityList();. This will return a comma-separated list of IDs representing all of the group Identities the currently logged in user belongs to. Chris
    Christopher Gillis Aras Labs Software Engineer
Children
No Data