CA Service Management

 View Only
  • 1.  Filter Change Category by type

    Posted Dec 14, 2018 10:23 AM

    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?

     

    Thanks,

    Vis  



  • 2.  Re: Filter Change Category by type

    Broadcom Employee
    Posted Dec 14, 2018 10:41 AM

    The format does not seem to be right...

    extraURL="ADDITIONAL_WHERE=chgtype = $args.chgtype"



  • 3.  Re: Filter Change Category by type

    Posted Dec 17, 2018 03:56 AM

    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= )

     



  • 4.  Re: Filter Change Category by type

    Broadcom Employee
    Posted Dec 17, 2018 05:32 PM

    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?



  • 5.  Re: Filter Change Category by type

    Posted Dec 18, 2018 01:39 PM

    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?



  • 6.  Re: Filter Change Category by type

    Posted Dec 21, 2018 07:51 AM

    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)



  • 7.  Re: Filter Change Category by type

    Posted Jan 10, 2019 09:07 AM

    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+"">

     

     

    extraURL="ADDITIONAL_WHERE=chgtype = $args.chgtype"