Skip to main content
3-Newcomer
December 5, 2022
Question

How to dynamically insertStep and RemoveStep wizard based on EndItem Attribute select in Windchill

We need to custom wizard in New Part Wizard on EndItem selection

If end-Item is set to "yes" then insert the Wizard step

Else remove the wizard step

2 replies

HelesicPetr
22-Sapphire II
December 6, 2022

Hi @SB_9154527 

You need to check wizard examples in the Windchill catalog 

Examples describes exactly what you need. Show and hide Wizard steps

 

https://WINDCHILLServer/Windchill/app/#netmarkets/jsp/componentCatalog/wizardComponent.jsp

 

HelpCenter example 1

HelpCenter example 2

 

HelesicPetr_0-1670314796232.png

 

PS:

in the JSP page for the element you should define a javascript to show or hide the step
example with check box

<wrap:checkBox name="DynamicStep" id="dynamicStep" label="Add Wizard step"
renderLabel="true"
renderExtra="enabled" renderLabelOnRight="true" checked="false"
onclick="addDynamicWizard()"/>

the jscript can be as follow.

function addDynamicWizard() {
var showCustomWizard = document.getElementById('dynamicStep').checked;

if (showCustomWizard) {
insertStep('AVCustomStepWiz');
} else {
removeStep('AVCustomStepWiz');
}
}

PetrH

Translate
3-Newcomer
December 6, 2022

Thanks Petr.

 

I am aware of the solution for the dynamic display wizard for new attributes. I cannot use this solution for the driver attributes panel because when I change the EndItem value to "yes" the page doesn't get refreshed for javascript to get called. 

 

function toggleEndItemStep() {
var type_beingCreated = document.getElementById("endItem").value;
var allowed_type1 = "True";
if (type_beingCreated == allowed_type1 ) {
alert('insertstep ');
insertStep('defineAttributesWizStepForEndItem');
} else {
alert('Remove Wizard ');
removeStep('defineAttributesWizStepForEndItem')
}
}

Translate