Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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
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
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
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')
}
}