Skip to main content
15-Moonstone
Mar 23, 2018 6:38 AM UTC
Solved

Dynamic Drop down list in Windchill

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

3-Newcomer
Apr 3, 2018 8:26 PM UTC

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.

7 replies

17-Peridot
Mar 23, 2018 6:53 AM UTC

In 11.1 this is a OOTB feature.

Translate
aachanta15-MoonstoneAuthor
15-Moonstone
Mar 23, 2018 7:37 AM UTC

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

Translate
3-Newcomer
Mar 23, 2018 3:11 PM UTC

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

Translate
1-Visitor
Apr 2, 2018 10:18 AM UTC

Hi, This can be achieved using Data utility.

 

Did you try it out?

 

Amakarthi

Translate
3-Newcomer
Apr 3, 2018 8:26 PM UTC

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.

Translate
ShirishMorkhade
16-Pearl
Apr 2, 2018 7:56 PM UTC

@aachanta, @BjoernRueegg,

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. Man Sad

 

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 

Translate