Skip to main content
1-Visitor
October 13, 2015
Solved

Conditionally Required Attribute on CR in Windchill

  • October 13, 2015
  • 2 replies
  • 3921 views

Is there a way to make an attribute conditionally required on the creation of a Change Request? Example: if Attribute 1 is set to TRUE Attribute 2 is now required. If Attribute 1 is set to FALSE Attribute 2 is grayed out.

Best answer by rhermann

Here is the solution:

  1. In the type and attribute administration edit the object type and click on the downstream attribute (attribute 2 in this use case)
  2. Add a “Required” Constraint to the downstream attribute (In this use case Attribute 2)
  3. Next to the constraint there is a link to “Add Conditions”  click on it
  4. Click on the green plus sign in the popup window to add a condition
  5. For the driver attribute choose the upstream attribute from the list (in this use case Attribute 1)
  6. For rule choose Legal Value List
  7. In “Enter Data” type in the trigger (In this Use Case “True”)
  8. Click OK
  9. Click OK
  10. Save

2 replies

rhermann1-VisitorAuthorAnswer
1-Visitor
October 14, 2015

Here is the solution:

  1. In the type and attribute administration edit the object type and click on the downstream attribute (attribute 2 in this use case)
  2. Add a “Required” Constraint to the downstream attribute (In this use case Attribute 2)
  3. Next to the constraint there is a link to “Add Conditions”  click on it
  4. Click on the green plus sign in the popup window to add a condition
  5. For the driver attribute choose the upstream attribute from the list (in this use case Attribute 1)
  6. For rule choose Legal Value List
  7. In “Enter Data” type in the trigger (In this Use Case “True”)
  8. Click OK
  9. Click OK
  10. Save
16-Pearl
October 3, 2016

Do we need to add the second attribute into the layout?

rhermann1-VisitorAuthor
1-Visitor
October 3, 2016

If one attribute is being set by a user and driving another attribute during creation of an object you would at least want to have them both in the "create new" layout and possibly also in the "edit" layout.  It would then be up to you if you wanted these attributes and the metadata stored in them to be able to be seen by users on the details page for instance.  If you do then you would want to add the attributes to the additional appropriate layouts.

Hope that helps...

-Ryan

16-Pearl
October 3, 2016

I'm just starting to test on 11 and not having much luck.

This is on the CR "Set Attributes" page. I have a Global Attribute called "Validation Required" with a Enumerated Value List of Yes, No.

Then in a second attribute called "Validation Type" that is Required also, the Required has a Conditional of upstream "Validation Required" = Yes then Validation Type, Required.

Validaton Type.jpg

This is how it is displaying:

CR.jpg