CA Service Management

Expand all | Collapse all

CA SDM count number of occurence in Activity Log List and set number to field

  • 1.  CA SDM count number of occurence in Activity Log List and set number to field

    Posted Apr 25, 2019 06:07 AM

    Hi all,

     

    any idea how to count the number of occurenece in Activity Log and set the number to some field?

    How

    <PDM_LIST PREFIX=alg WHERE="alg.type = " FACTORY=alg>

     

    </PDM_LIST>

     

     document.main_form.elements["SET.zoccurence"].value

     

    Thanks,

    Domagoj



  • 2.  Re: CA SDM count number of occurence in Activity Log List and set number to field
    Best Answer

    Posted Apr 25, 2019 07:46 AM

    I've tested and it's working.

    The only thing that i need to edit & save request so that the value is being saved.

     

    Is there function to 'edit' and save the request? So I can 'preupdate' the request.


    var log_bounce = 0;

     

    <PDM_LIST prefix="countTransfeerBounces" factory="alg" where="call_req_id='$args.persistent_id' and type='TR'">

     

    <PDM_IF "$countTransfeerBounces.id" != "0">

     

    log_bounce++;

     

    </PDM_IF>

     

    </PDM_LIST>

     

    document.forms["main_form"].elements["SET.zbounces"].value=log_bounce;

     


    });

     

    Thanks,

    Domagoj