cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Translate the entire conversation x

Need help hiding a CAD Document attribute based on context

SumA_ZF
4-Participant

Need help hiding a CAD Document attribute based on context

Version: Windchill 13.0

 

Use Case: I need to hide the CAD Document attribute SAP_MATNO dynamically based on context in the windchill UI


Description:

Windchill Version: 13.0
Object Type: CAD Document
Internal Name: com.trw.ssc.DefaultEPMDocument
Attribute: SAP_MATNO (IBA)


Requirement

I need to hide the CAD Document attribute SAP_MATNO dynamically based on context in the windchill UI

Expected behavior

  • When the CAD Document is created/edited/viewed inside the container named “Training”, the attribute SAP_MATNO should be visible in windchill ui.

  • In all other containers, the attribute must be hidden in windchill ui

Additional requirement

The logic must work consistently across:

  • View information page

What I’ve tried

I implemented an AttributeDataUtility class to check:

  • The attribute name

  • The CAD Document type (com.trw.ssc.DefaultEPMDocument)

  • The current container (resolved via NmCommandBean + TeamCCHelper)

Then the utility sets:

  • attrState.setVisible(false)

  • attrState.setReadOnly(true)

  • attrState.setValue(null)

However, I want to confirm:

  1. Whether this is the correct approach in Windchill 13.0, or

  2. Should I instead use UI Validation – Pre-Validation (Validator + service.properties.xconf mapping)?

Goal

Find the best supported method in Windchill 13.0 to hide a specific attribute for a specific CAD Document subtype based on current container name.

Looking for

  • Confirmation of the correct mechanism (DataUtility vs UI Validator) coding would be helpful

  • Example of a recommended implementation

  • Required XCONF registration steps

1 REPLY 1
avillanueva
23-Emerald I
(To:SumA_ZF)

Just to confirm, your data utility method, do you have this working? Strange requirement. What the purpose of having this attribute only for Training context?

Announcements
Top Tags