CA Service Management

Expand all | Collapse all

dtlLookup trigger "onChange" function from lookup search page

Jump to Best Answer
  • 1.  dtlLookup trigger "onChange" function from lookup search page

    Posted 08-03-2018 06:42 AM

    Hi everyone,

     

    I need a help. The issue is, I want to disappear / appear a filed in transfer ticket screen (xfer_esc_cr.htmpl) according to value in "New Group" field. If I write the name of the group or select from auto-complete list, it works fine;

     

    <PDM_MACRO name=dtlLookup hdr="New Group" attr=group make_required=yes evt="onChange=\\\"make_transfer_reason_visible()\\\"">

     

    but if I try to select the new group from group list screen, then it does not work. I cannot trigger the new function on onChange event from group list screen. How can I achieve it, could you please help me?

     

    Best Regards

    Utku



  • 2.  Re: dtlLookup trigger "onChange" function from lookup search page
    Best Answer

    Posted 08-06-2018 03:43 AM

    hi,

     

    there should be a function backfill_cnt_event(), which is called after coming back from choosing a cnt via list form.

     

    regards



  • 3.  Re: dtlLookup trigger "onChange" function from lookup search page

    Posted 08-09-2018 02:51 AM

    Thanks pacy99, your suggestion worked for me. I was trying to code the complete function which I need, so that took some time. Thank you for your advice.

     

    BR

    Utku



  • 4.  Re: dtlLookup trigger "onChange" function from lookup search page

    Posted 08-06-2018 09:56 AM

    Hi Utku!

     

    Due to HTML logic, only value changes commited by user are triggering onchange event: change - Event reference | MDN 

     

    In your situation new value is populated by JavaScript (not by user), so there is 2 ways:

    - call onchange manually after populating new value: https://api.jquery.com/change/ 

    - add JavaScript interval that will check current value and compare it with previous, so you can trigger some function if value will be changed.

     

    As pacy99 suggested, there is inner js function designed to catch backfill but looks like it works only with cnt factory.

     

    Regards,

    Timur



  • 5.  Re: dtlLookup trigger "onChange" function from lookup search page

    Posted 08-07-2018 04:17 AM

    hi *,

     

    in our system (r14.1) backfill_cnt_event() works well with grps, too

     

    regards, marc

     

     

     

    •