How to query for the latest generation of items that the user has access to?

Former Member
Former Member
Hi, I would like to ignore the "is_current" property when querying for items, and instead return the latest generation of each item that the user has access to (i.e. permission to "get"). For instance, since the permission_id can change for a given config_id, the user might not be able to access the vary latest:  Can I do this in AML? Or do I need to do some SQL magic instead? Would be great if somebody could help me implement a method that does this. Or at least show me how I should approach the problem.  
Parents
  • Hi Kalle, Typically AML queries only return the most current versions of items, but you can override this functionality by adding a property like below to your query. <generation condition="gt">0</generation> By manually querying for the generation like this, all versions of the items will be returned. You could then perform a search for specific permission_ids with something like below. <permission_id condition="in">95475AE006E7415794BDC93808DC04D2,A43FE707C3C54C90AD660D27A81AC58D</permission_id> Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hi Kalle, Typically AML queries only return the most current versions of items, but you can override this functionality by adding a property like below to your query. <generation condition="gt">0</generation> By manually querying for the generation like this, all versions of the items will be returned. You could then perform a search for specific permission_ids with something like below. <permission_id condition="in">95475AE006E7415794BDC93808DC04D2,A43FE707C3C54C90AD660D27A81AC58D</permission_id> Chris
    Christopher Gillis Aras Labs Software Engineer
Children
No Data