We want to show only the categories to the change type which is selected on the Change form. We know that the category has a field type, so category is already mapped to which change type it has to go. Only thing I need here is to show only the list of categories below to the change type.
I have changed the category from dtlhier to dtllookup and added a extraURL to add WHERE by chgtype. But that didn't work.
extraURL = "ADDITIONAL_WHERE chgtype = $args.chgtype"
Can someone help to achieve this?
The format does not seem to be right...
extraURL="ADDITIONAL_WHERE=chgtype = $args.chgtype"
Thanks, Chi!! Actually this is the one I used but while typing here on the communities, I missed '=' operator after WHERE.
When I use this extraURL, I get the below error. I have the Type selected before the category in the form. I think the attribute $args.chgtype is not having the value when we choose the category
AHD03053:Bad where clause: Parse error at : "( owning_contract IS NULL AND chgtype= )
Yes it seems to say $args.chgtype is blank as you don't save the chg yet.
Maybe consider a js onChange on the type field function to populate some local var and pass that var to extraURL?
I tried that option as well. I am getting the below error
chgtype=(Unable to access value locchgtype)
Is there a specific way to pass a var to the extraURL?
Is there a specific way to pass a local variable to the extraURL?.
var locchgtype is declared above the form where all other local variables are declared. Then I am assigning the chgtype value inside a function which is invoked during the onChange() in chgtype PDM_MACRO
I used as extraURL="ADDITIONAL_WHERE=chgtype = $locchgtype"
I am getting the below error in using it.. chgtype=(Unable to access value locchgtype)
in CMDBNotebook.htmpl, I see there is an option to set the local variable value to the server variable. but that also didn't work..
locchgtype = el.elements["SET.chgtype"].value;<PDM_SET args.chgtype = ""+locchgtype+"">