CA Service Management

 View Only
  • 1.  Attribute for the export

    Posted Jul 05, 2017 07:50 PM

    Hello everyone

    I am trying to get the following information with the export button in the CA SDM ticket list.

    Between these fields we need to get the last log comment of the ticket

    Is it possible to get this value in the export?
    If so, can help me with the code that is added to the web form of list_in.


    Code in list_in.

    <PDM_MACRO name=lsCol hdr="Incident #" attr=ref_num exportFmt="ShowLink" fmtfunc=writeIcon link=yes style=ref_num_style>
    <PDM_MACRO name=lsWrite both=yes text="if (show_template_name) {">

    <PDM_MACRO name=lsCol hdr="Template" attr=template_name exportFmt="ShowLink" link=yes>
    <PDM_MACRO name=lsWrite both=yes text="}">
    <PDM_IF "$env.NX_SAP_GUID" != "">
    <PDM_MACRO name=lsCol hdr="SAP #" attr=sap_msg>
    <PDM_MACRO name=lsCol hdr="Summary" attr=summary max_char=60 width=400>
    /**<PDM_MACRO name=lsCol hdr="Prioridad" attr=priority sort="DESC" width=100>**/
    <PDM_MACRO name=lsCol hdr="Category" attr=category sort="DESC" width=300>
    <PDM_MACRO name=lsCol hdr="Status" attr=status width=100>
    <PDM_MACRO name=lsCol hdr="Assigned Engineer" attr=assignee>
    <PDM_MACRO name=lsCol hdr="Assigned Group" attr=group>
    <PDM_MACRO name=lsCol attr=open_date label="Open Date" startrow=yes>
    <PDM_MACRO name=lsCol attr=mintgt label="Service Target">
    <PDM_MACRO name=lsCol attr=group label="Group">
    <PDM_MACRO name=lsCol attr=customer colspan=3 fmtfunc=writeIcon label="Affected End User">
    <PDM_MACRO name=lsCol attr=problem.ref_num exportHdr="Problem" label="Problem">
    <PDM_MACRO name=lsCol attr=parent.ref_num exportHdr="Parent" label="Parent">
    <PDM_MACRO name=lsCol attr=caused_by_chg.chg_ref_num exportHdr="Caused by Change Order" label="Caused by Change Order">
    <PDM_IF "$env.NX_MULTI_TENANCY" == "on">
    <PDM_MACRO name=lsCol attr=tenant.in_apc_flag hidden=true>

    thanks for your help.


    Marco Velazquez.

  • 2.  Re: Attribute for the export

    Posted Jul 06, 2017 03:26 AM


    I think it's possible, but I don't know syntax of rs.exportList function, so you need to perform some tests to get working method.

    Algorithm could be (please notice, it's not working solution):

    1. Fetch latest alg:

    <PDM_MACRO name=lsWrite text="var zComment = '';">
    <PDM_MACRO name=lsWrite text="<PDM_LIST ESC_STYLE=C FACTORY=alg WHERE=\"call_req_id = '@{list.persistent_id}'\" PREFIX=algs>">
    <PDM_MACRO name=lsWrite text="if (zComment.length < 1) zComment = '@{algs.analyst.combo_name}</i>' + ' : ' + '@{algs.description}';">
    <PDM_MACRO name=lsWrite text="</PDM_LIST>">

    2. Then include it into export list:

    function zShowComment(value) {
         // Here you need to know how rs.exportList works and what exportObject contains
         // I don't know correct syntax but it could be something like this:
         // rs.exportList("", "id", "yes",  zComment,  "yes",  "id",  "",  "id");;

    3. Use fmtfunc to display data and append it into export:

    <PDM_MACRO NAME=lsCol hdr="Comment" attr="id" fmtfunc=zShowComment>


    Everything could be much easier if exportfmt function will work same as fmtfunc.