Skip to main content
1-Visitor
January 29, 2018
Solved

Display Text from a Related Item

  • January 29, 2018
  • 2 replies
  • 4459 views

All,

 

   I need to display a short text field of the first Item related on an Item (similar to an FVA but on a multiple to multiple relationship).  Is is possible to us a computed field to accomplish this?  I know that the short text is easily displayed, but I have not been able to find how to navigate the relationship to display it.

 

  A trigger will not work in my case because once the item is released, it cannot be updated, preventing the trigger from updating the value.  I also do not want the history updated because the related item was updated.

 

Thank you,

 

Paul

Best answer by VolkerEckardt

Hi Paul,

here is my complete suggesion. I still believe (hope) its what you are looking for:

 

Field 1: RefSummary
Type: shorttext
Computation: getFieldValue(RefItemID, Summary)

 

Field 2: RefItemID

Type: integer

 

Add both fields to your Child Type.

Into  RefItemID you put the parent ID from the item thats Summary you like to display.

When you update the relationship in A you also update (with a vers small trigger) the RefItemID, automatically.

 

Finally, item A will always display the latest Summary text from B.

 

Let me know if I missed something in my concept.

 

Volker 

 

2 replies

17-Peridot
January 30, 2018

Hi Paul,

quite interesting request.  Just to understand better:

a) you have an item A

b) A has a multi relationship to item Type B   (1:n or n:m)

c) And, in A you like to see the summary from the first related item B?

Is this what you need?

Just a quick idea: you could define a hidden field (1:1 or n:1) and put via trigger the FIRST relationship also into it. Then, you could use the GetFieldValue formula to retrieve the Summary.

Perhaps, also just a plain integer field would work.

I hope you get the approach I am trying to explain.

Would you like to give a try?

Volker 

 

17-Peridot
February 3, 2018

Hi Paul

would you mind telling us your business case for this request, please? I am just interested.

Thank you

 

1-Visitor
February 5, 2018

Volker,

 

   I have a 1 to many relationship that currently has an FVA that displays information from 1 (parent) requirement on another (child).  I need to convert the relationship to many to many, which is not supported by the FVA.  I am looking for a way to continue to display the information on the child requirement without updating it.

 

  The trigger option is less than ideal due to the fact that many of the requirements that display the information are locked and MUST not be updated and even if I wanted to they cannot be due to constraints.  For example we have a constraint on which users may be in a field; when the user changes groups the constraint is no longer valid, but the field must not be updated to a valid users unless the requirement is in a CR, which may only include the parent and not the child. 

 

   With this in mind, what I would like to do is to display the value from one of the parents on the child.  All parents will have the same value for this field, so it really does not matter which one is used.

 

Thank you,

 

Paul

17-Peridot
February 5, 2018

Hi Paul,

here is my complete suggesion. I still believe (hope) its what you are looking for:

 

Field 1: RefSummary
Type: shorttext
Computation: getFieldValue(RefItemID, Summary)

 

Field 2: RefItemID

Type: integer

 

Add both fields to your Child Type.

Into  RefItemID you put the parent ID from the item thats Summary you like to display.

When you update the relationship in A you also update (with a vers small trigger) the RefItemID, automatically.

 

Finally, item A will always display the latest Summary text from B.

 

Let me know if I missed something in my concept.

 

Volker