Forum Discussion
Nithin_Mahesh
5 years agoIdeator I
Hi jthoma,
I am not sure I fully understand your question, can you give me some more details on what you are trying to do? Are you trying to only query for the relationships not containing the Identity John Doe in your Work Order Distribution relationship? If possible this might be easier to create within a method instead of AML. Take a look at this example sudo code:
C#:
Innovator inn = this.getInnovator();
Item workorder = inn.newItem("Work Order", "get");
workorder.setAttribute("select", "id, physical_part, workorder_id");
Item rel = workorder.createRelationship("Work Order Distribution", "get");
rel.setAttribute("select", "source_id,id,owned_by_id");
workorder = workorder.apply();
// get relationships
Item distributions = workorder.getRelationships("WO_WorkOrder Distribution");
//Loop through relationships
for(int i=0; i<distributions.getItemCount(); i++) {
// Get Identity property (owned_by_id maybe)?
//if ownned_by_id is not John Doe
// then return only these
}
Hope this helps!
Nithin