Skip to main content
1-Visitor
Oct 13, 2015 12:58 AM UTC
Solved

Conditionally Required Attribute on CR in Windchill

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.

rhermannAnswer
1-Visitor
Oct 14, 2015 7:09 PM UTC

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

6 replies

rhermann1-VisitorAuthorAnswer
1-Visitor
Oct 14, 2015 7:09 PM UTC

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
Translate
16-Pearl
Oct 3, 2016 4:22 PM UTC

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

Translate
rhermann1-VisitorAuthor
1-Visitor
Oct 3, 2016 4:28 PM UTC

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

Translate
16-Pearl
Oct 3, 2016 4:40 PM UTC

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

Translate