Related item property in the main search grid?

Hi, maybe it is a silly question but I can't manage it. I have a relationship item "Part Integration" and it has a customized property "integration_number". I want this to be visible in the main Part search grid. I tried to uncheck hidden1 and hidden2 but nothing happens. thank you in advance Duygu
  • Thanks a lot for the information. I can now access the properties of the relationship denoted by the "this" context object. But, now, I am blocked by another type of error : I can not set any property of the source part using the value of any property of the relationship. I am getting an error saying : "An item with the same key has already been added". How can I solve this error ? The code now is as follows: Innovator inn = this.getInnovator(); string my_type = this.getType(); string my_id = this.getID(); Item relation = inn.newItem(my_type,"get"); relation.setAttribute("id", my_id); relation = relation.apply(); string E_no = relation.getProperty("_uzay_rel_e_no"); string source_id = relation.getProperty("source_id"); Item sourcePart = inn.newItem("Part","edit"); sourcePart.setAttribute("where", "[Part].id = '" + source_id + "'"); sourcePart.setProperty("_uzay_part_e_no",E_no); sourcePart = sourcePart.apply(); return inn.newError("nb.of items found = " + sourcePart.getItemCount());    
  • Hi OEAKDEMIR, This should work. Innovator inn = this.getInnovator(); string my_type = this.getType(); string my_id = this.getID(); Item relation = inn.newItem(my_type,"get"); relation.setAttribute("id", my_id); relation = relation.apply(); string E_no = relation.getProperty("_uzay_rel_e_no"); string source_id = relation.getProperty("source_id"); Item sourcePart = inn.newItem("Part","edit"); sourcePart.setAttribute("id",source_id); sourcePart.setProperty("reference_designator",E_no); sourcePart = sourcePart.apply(); if (sourcePart.isError()) { return inn.newError("no of items found = " + sourcePart.getItemCount()); } return this;
  • Thanks a lot for your quick reply. Unfortunately I still get the same error : “An item with the same key has already been added” The code is now as follows: Innovator inn = this.getInnovator(); string my_type = this.getType(); string my_id = this.getID(); Item relation = inn.newItem(my_type,"get"); relation.setAttribute("id", my_id); relation = relation.apply(); string E_no = relation.getProperty("_uzay_rel_e_no"); string source_id = relation.getProperty("source_id"); Item sourcePart = inn.newItem("Part","edit"); sourcePart.setAttribute("id", source_id); sourcePart.setProperty("_uzay_part_e_no",E_no); // _uzay_part_e_no is a string propery of the Part Item Type. sourcePart = sourcePart.apply(); if (sourcePart.isError()) { return inn.newError("nb.of items found = " + sourcePart.getItemCount()); } return this;
  • Hi, Can you enable the debugger and try to check what is the AML you are getting from this method or can you provide me the steps to replicate this issue. Alternatively, you can try updating the Part '_uzay_part_e_no' using NASH and check how it behaves in AML <AML> <Item action="edit" type="Part" id="id of the part"> //get the part id from file --> Properties in Part <_uzay_part_e_no>2000</_uzay_part_e_no> </Item> </AML>
  • To manage your all data like contact details important form filling information etc just visit here
  • Hi, When I run the code from Nash, the update is OK. But when I run it for the second time, the update is not done, showing me a short <SOAP-ENV: Envelope> ... </SOAP-ENV: Envelope> message. Is it normal for the part id to change for every operation ? When the second trial fails, I copied the new id from the part and inserted it into the AML code, it succeeds.
  • Hi, Yes, on every update operation new generation of the part will be created (ID will be different for each generation). If you don't want to change the ID you need to keep version='0' in AML query. Are you able to debug the issue in Visual Studio or please share the steps to repro this issue.
  • Hi again,   I finally installed MS Visual Studio and started debugging. What kind of information shall I post here from debugging environment ?    
  • I produced two screenshots showing the status of the debugging before and after the apply() method. Can you access the images at the link ? drive.google.com/.../11PONZ2gnJ-YSYM_-RjizMiUJkkWjpQiK What can I conclude from the data there to understand the reason behind the error message : "An item with the same key has already been added' ?
  • Hi Can you check the values you are getting for uzay_rel_e_no and AML generated to edit the part (In your screenshot screen1, red coloured line.