This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Required Relationship between Part and ECO

brueegg - Friday, July 16, 2010 4:53 AM:

Hi together

I need to make a relationship required between a new Part and an existing ECO. So the user needs to have an ECO in a certain state before he can create a new Part.

What is the simplest way to configure / program this demand?

Do I have to write a short method (onFormPopulated) to check if he connected a ECO to the part or is it possible to set somewhere a tick for making a relationship required?

 

Thanks for you help



Yoann Maingon - Sunday, July 18, 2010 4:51 PM:

Hi,

The issue you might have here is that in the Innovator data model, the Part is not pointing the ECO, it's the other way around. here the datamodel:

Simple ECO -> Simple ECO Affected Item (relationshiptype) -> Affected Item --(property of type item)-> Itemid

So you would like the Author to create a Part and to be allowed to save it only if there is an ECO? that doesn't sound possible as you would need to make your ECO point to your new part first which is not created.

My advice, would be that you add a preliminary step in your Part lifecycle. And from this step, you had some code on the promotion event to check if it has an ECO linked before moving to the next state.

not sure it is clear enough?

Good luck,

Yoann

 



brueegg - Monday, July 19, 2010 5:14 AM:

Hi,

Thanks for your reply. Isn't it possible to have a bi-directional relationship? So you can choose from the part which ECO is connected and from the ECO which Part? As I understand you, it is only possible to choose a Part from the ECO and not the other way around.

I understand the way with a new status but that is exactly not the way we want it. We have the philosophy that no part can be created without any work order (ECO).

Thanks



Yoann Maingon - Monday, July 19, 2010 6:59 AM:

Quick idea, maybe not the best.

Add a property of type item in your Part itemtype definition select "simple ECO" as datasource

then add the item field in your Part Form.

And then add some code to:

- check if an ECO item has been selected (maybe some more checks on the ECO state)

- onafteradd event, add your part id to your ECO

I recommend that once the part is created, you disable this field because you would have two links which is not good.

Hope it's not to complicated!

Yoann



brueegg - Monday, July 19, 2010 7:11 AM:

Hi

That's the way I thought I have to do it. I just wanted to know, if there is just a "tick" to set or if I have to to do it the hard way. Since there is a checkbox to set a property "required" I thought there might be something similar for a relationship also.

Thanks



Yoann Maingon - Monday, July 19, 2010 9:02 AM:

yes there is one on the relationship type but it would work for a document for example not for an ECO as the ECO point to the Part and not the other way around.

We made a software some month ago to see the data-model in a UML diagram. That helps us a lot to explain how the Innovator solution works.http://www.prodeos.fr/?p=81

 

Yoann