Skip to main content
15-Moonstone
March 23, 2018
Solved

Dynamic Drop down list in Windchill

  • March 23, 2018
  • 3 replies
  • 7571 views

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

Best answer by Florent_274366

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.

3 replies

17-Peridot
March 23, 2018

In 11.1 this is a OOTB feature.

aachanta15-MoonstoneAuthor
15-Moonstone
March 23, 2018

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

1-Visitor
March 23, 2018

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

1-Visitor
April 2, 2018

Hi, This can be achieved using Data utility.

 

Did you try it out?

 

Amakarthi

1-Visitor
April 3, 2018

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.

16-Pearl
April 2, 2018

@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