CA Service Management

  • 1.  Change type based category filter

    Posted May 10, 2019 01:47 PM

    I am trying to make some changes in category filter to have only corresponding change types

    If change type is standard ,the category filter should show only standard categories 

    I have tried below ,

    <PDM_MACRO name=dtlLookup hdr="Category" attr=category evt="onChange=\\\"change_category_func('chg',null,'chgcat')\\\"" extraURL="QBE.EQ.chgtype= $args.chgtype">

     

    But it is working

    -> when edit the change order If it has already change type (Showing categories for particular change types)

    Not working

    ->At the time of change order creation ( Showing all categories)

    ->Onchange of change type ( Showing the categories of old change type before edit) 

     

    I think its because am trying to get value before save

    Is there any other  way to achieve this ?

    Can anyone help me on this?

     

     

    Thanks,

    Lakshmi



  • 2.  Re: Change type based category filter
    Best Answer

    Posted May 13, 2019 05:31 AM

    hi,

     

    you can modify your search filter on the fly by simply adding this standard exit to your head -> script section of detail_chg.htmpl:

     

    function modify_search_extra(factory, backfill_field, backfill_form, is_3_field_contact, backfill_attr) {
        if(factory == "chgcat" && backfill_field == "KEY.category" && backfill_form == "main_form") {
            return "QBE.EQ.chgtype=" + (document.getElementsByName("SET.chgtype")[0]).value;
       }
    }

     

    but you have to ommit the "QBE.EQ..." from PDM_MACRO.

     

    regards,

    pacy



  • 3.  Re: Change type based category filter

    Posted May 13, 2019 11:04 AM

    Hi pacy99

    Thanks for reply.

    From where i should call this function ? and how to call because it has some arguments.

     

     

    Thanks,

    Lakshmipriya



  • 4.  Re: Change type based category filter

    Posted May 14, 2019 07:41 AM

    there is no need to call this explicity. the ootb search function will call it automatically if it is present