pankaj - Sunday, June 1, 2014 3:12 AM:
Hi,
<Item type='part' action='get' select="id" maxRecords='200' >
<Relationships>
<Item type='Part Specification' action='get' select='id,source_id,related_id'>
<related_id>
<Item type='Document' action='get' select="id" maxRecords='200' >
<state condition="ne">Preliminary</state>
</Item>
</related_id>
</Item>
</Relationships>
</Item>
Still i am able to get the data which is having, document state Preliminary, i want to restrict the data.
Can anyone do this query ?
Thanks
Pankaj B
DavidSpackman - Sunday, June 1, 2014 8:33 PM:
Hi Pankaj,
Your query worked on my test database with no issues, however, when I removed this line <state condition="ne">Preliminary</state>, it displayed all parts regardless of if a Part Specification relationship existed or not.
Here is another way to write the query.
<AML>
<Item type="Part Specification" action="get" select="id,source_id,related_id">
<related_id>
<Item type="Document" action="get" select="id, state">
<state condition="ne">Preliminary</state>
</Item>
</related_id>
<source_id>
<Item type="Part" action="get" select="id, item_number"></Item>
</source_id>
</Item>
</AML>
pankaj - Monday, June 2, 2014 8:36 AM:
Hi David,
Thanks for your AML query, and it return the records absolutely correct.
But in my scenario i am implementing search functionality, which i will trigger from part. I am getting the records duplicate in Main Grid(Part Grid). Could you please help me in this scenario.
Regards,
Pankaj B
DavidSpackman - Monday, June 2, 2014 8:32 PM:
Hi Pankaj,
Can you provide a little more information?
- What do you mean by duplicate records?
- When are you running the search?
- Are running this on the client or server?
pankaj - Tuesday, June 3, 2014 2:28 AM:
Hi David,
If the Same Document is attached in 2different Parts then i am getting duplicate Records.
Ya i am running the search through action.
I am running this in Client Side.
DavidSpackman - Tuesday, June 3, 2014 9:33 PM:
Hi Pankaj,
Are you using xpath to extract the records from the returned AML query?
You might need to include some javascript code to exclude the duplicates.
If you think that will help, post your code, and how you have configured Aras to run it
pankaj - Thursday, June 19, 2014 2:10 AM:
Hi David,
Thank you so much for helping in this issue.
Ya, i am using xpath to extract the records.