CA Service Management

  • 1.  Hello, exist some way to display the contract number field related to the affected resource on the ticket (cr)?

    Posted Jan 16, 2017 08:52 PM

    I need to display the contract num field on the detail_cr.htmpl ??

     

    Using SQL Server i can get it from this query:

     

    select a.contract_num from svc_contract a, sdsc_map b, ca_owned_resource c
    where a.id=b.map_contract and b.map_persid = 'nr:'+ dbo.hex(c.own_resource_uuid)
    and a.contract_num is not null

     

    Any idea??



  • 2.  Re: Hello, exist some way to display the contract number field related to the affected resource on the ticket (cr)?

    Posted Jan 17, 2017 12:09 AM

    You can use web screen painter to add a readonly field to detail_cr. The attribute would be affected_resource. contract_num. 

     

    Another option that I like to use to display read only data is include it in the header. For example, on the configuration item field you can add $args.affected_resource.contact_num to the header text, which will conditionally display if it exists. 



  • 3.  Re: Hello, exist some way to display the contract number field related to the affected resource on the ticket (cr)?

    Posted Jan 17, 2017 07:59 PM

    The contract_num is not part of the nr factory, so can't add the attribute affected_resource. contract_num



  • 4.  Re: Hello, exist some way to display the contract number field related to the affected resource on the ticket (cr)?

    Posted Jan 17, 2017 08:34 PM

    I replied without looking at the data model, I'll look up the relationship tomorrow. I'm guessing this is an Lrel relationship, not srel (which I assumed earlier). 



  • 5.  Re: Hello, exist some way to display the contract number field related to the affected resource on the ticket (cr)?

    Posted Jan 18, 2017 05:20 PM

    Hi Bassoalto,

     

    It doesn't look like NR has any direct relationship to sdsc_map or svc_contract, you won't be able to display it on the form without adding an additional field on NR to capture this data.



  • 6.  Re: Hello, exist some way to display the contract number field related to the affected resource on the ticket (cr)?

    Posted Jan 19, 2017 07:47 AM

    Hi,
    Another way may be to retrieve you value using a <pdm_list> and display it on your form using small javascript:
    to be explored but out of my mind something like the speudo code below must be able to accomplish your needs or at less the principle is there

     

    var z_svc_contract_sym = new Array();
    var z_svc_contract_ids =new Array();

    <PDM_LIST prefix=zsvccntlist factory=sdsc_map WHERE="delete_flag = 0 AND _mapped_nr= '$args.affected_resource'" >
    z_svc_contract_sym[z_svc_contract_sym.length] = decodeURIComponent('$zsvccntlist.map_contract.sym') ;
    z_svc_contract_ids[z_svc_contract_sym.length] = '$zsvccntlist.REL_ATTR';
    </PDM_LIST>
    if (z_svc_contract_sym.length[] > 0){
    var z_svc_contract display = z_svc_contract_sym[0];

    the javascript for the display go here
    }