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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How can I populate Combobox2 based on the selected value in Combobox1?

Anil_SAD
12-Amethyst

How can I populate Combobox2 based on the selected value in Combobox1?

Version: Windchill 11.2

 

Use Case: In the Create New Document Wizard, the values in Combobox2 should dynamically change based on the selection in Combobox1.


Description:

Hi there,

I want to implement a dynamic selection for an Azure-Windchill integration project.
I’ve written and tested two different functions, both of which are working:

  1. Function - func1: Retrieve repository names from Azure. 
  2. Function - func2: Take a repository name as a parameter and retrieve folder names from the first two levels within that repository.

There is no issue with the functions; both work successfully when I manually input a repository name.

When the user starts the Wizard by selecting “New Document,” there are two different comboboxes in the opened window.

  • Combobox1 holds a list of repository addresses.
  • Combobox2 should hold the folder names within the repository based on the "selected" repository attribute value in Combobox1.

I can dynamically retrieve the values for Combobox1 with a data utility as soon as the window opens, and this works without any issues.

Anil_SAD_0-1733809451277.png

 

However,

My question is: How can I populate Combobox2 with the desired values based on the selected value in Combobox1? (Both of the comboboxes must be dynamic)

In the Create New Document Wizard, the values in Combobox2 should dynamically change based on the selection in Combobox1.

P.S. I don't have any problems with the Azure-Windchill connection, i can get correct values by my functions.

ACCEPTED SOLUTION

Accepted Solutions
Anil_SAD
12-Amethyst
(To:Anil_SAD)

I solved the problem by these steps;
1- Created DataUtility for Combobox1 for get Repo Names from Azure, added Js action
comboBox.addJsAction("onchange","TestScript()");
2- Then edited CreateWizStep
3- Created Servlet for parse folder names. 

View solution in original post

2 REPLIES 2

Hi @Anil_SAD,

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. 

 

Regards,

Vivek N
Community Moderation Team

Anil_SAD
12-Amethyst
(To:Anil_SAD)

I solved the problem by these steps;
1- Created DataUtility for Combobox1 for get Repo Names from Azure, added Js action
comboBox.addJsAction("onchange","TestScript()");
2- Then edited CreateWizStep
3- Created Servlet for parse folder names. 

Announcements

Top Tags