Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi All,
I wish to customize a functionality in Windchill likewise to create a dynamic drop down list.
If a user selects Value A in the Attribute A drop down list , Attribute B list should be populated dynamically.
Likewise if Value B is selected in Attribute A again the Attribute B list should change and another list of values should get populated dynamically.
Can you all please let me know like how it is done or possible. In case if anyone has any code snippet regarding the same kindly request you to please share the same.
Thanks in advance!
Best Regards,
Aditya Achanta
Solved! Go to Solution.
Yes, a datautility with a Javascript action that you have to add on create and edit page:
comboBox.addJsAction("onChange", "<yourJSAction(this)");
This javascript action will have to perform an ajax call and the result will be interpreted by the javacript to refresh the "slave" combo-box.
For the FormProcessor to take into account your datautility, you have to set the columnName:
comboBox.setColumnName(AttributeDataUtilityHelper.getColumnName(modeledAttribute, typeInstance, mc))
But again, this is an heavy customization.
In 11.1 this is a OOTB feature.
Hi Brue
Actually I am trying to customize it in Windchill 10.2. So can you please let me know like how we can be doing it in 10.2
Thanks and Regards,
Aditya
Hi,
The name of this feature is Cascading Attribute.
To implement that in Windchill 10.2 (which support is on its end lifetime) is an heavy customization using Ajax.
Florent
I haven't a solution for this. There were once some examples around, but I can't find it anymore.
Since WC10.2 is running out of support I would suggest you wait until you upgrade to WC11.1.
Hi, This can be achieved using Data utility.
Did you try it out?
Amakarthi
Yes, a datautility with a Javascript action that you have to add on create and edit page:
comboBox.addJsAction("onChange", "<yourJSAction(this)");
This javascript action will have to perform an ajax call and the result will be interpreted by the javacript to refresh the "slave" combo-box.
For the FormProcessor to take into account your datautility, you have to set the columnName:
comboBox.setColumnName(AttributeDataUtilityHelper.getColumnName(modeledAttribute, typeInstance, mc))
But again, this is an heavy customization.
I still remember I once gave it a try on my own interest .But unfortunetly not able to get upto the final, working and most importantly elegant solution to this problem.
I gave it a try starting with custom data utility and I was able to create drop down for Attribute A.
However, after that I face too many issues, some are:
1. I found that since both attribute resides in single attribute panel, there is no way you refresh only Attribute B (which depends on Attributes B).
If I refreshed entire attribute panel, value of Attribute A also get reset.
2. I also observed that you also need to have custom form processor to take care of the values in attribute.
What I must say is this is not as straight forward as we think in 10.2 architecture and requires heavy customization. So I just changed my mind started working on other assignments.
- Shirish