CA Service Management

Expand all | Collapse all

Modifying list_in Form File

Jump to Best Answer
  • 1.  Modifying list_in Form File

    Posted 06-29-2018 02:38 PM

    I want to modify my list_in.htmpl form file to do the following but I am unsure how to use the "If" / "End If" with inserting controls onto the form via the WSP program.

     

    If status = Closed then display columns (closed by and close date) else only show status column

     

    Any help would be appreciated.

     

     

    thank you

    Katherine



  • 2.  Re: Modifying list_in Form File

    Posted 06-29-2018 07:56 PM

    Hi Katherine,

     

    I'm not sure how that would work on the list form as one record may by closed both others in another status, all depending on the filters. Did you mean detail_in form?



  • 3.  Re: Modifying list_in Form File

    Posted 07-02-2018 07:45 AM

    No I want it in the list_in form ... the form which shows the list of Incidents tickets when a user clicks on one of the folders from the scoreboard.

     

    On the scoreboard, I have 2 folders created ... Open Incidents and Closed Incidents. Using the list list_in form, I specify all the columns I want to show (which includes Closed By and Close Date). My issue is for the Closed By column, I am using the ticket assignee field since I can not grab the users name of the person who closed the ticket from the activity log. So for the Open Incidents the Closed By field is showing the assignee name even when the ticket still has an active status. (see image).

     

    Is there any other way I can accomplish this? Or another way to grab the name of the person who closed the ticket and use it in the Closed By field?

     

    thanks

    KatherineScoreboard Incident List Columns



  • 4.  Re: Modifying list_in Form File

    Posted 07-02-2018 08:16 AM

    There is a <PDM_IF></PDM_IF> macro. I have never had to use it on the list form though. Just search for it on any of the OOBT forms and see if that has ever been used on the list form. Otherwise you can find plenty examples of the usage on most detail forms like the detail_in.htmpl, detail_cr.htmpl, etc...

     

    That was my 2 cents...

     

    ===

    Kind Regards,

    Brian



  • 5.  Re: Modifying list_in Form File

    Posted 07-05-2018 10:14 AM

    Thanks for the input, I will look into this.



  • 6.  Re: Modifying list_in Form File

    Broadcom Employee
    Posted 07-02-2018 10:01 PM

    Hi Katherine,

    You could adapt my action macro in response to "Store Mail address in incident field in case of maileater " to capture the analyst from the 'Closed' activity log record and hold the analyst id in a custom field in the ticket - which you would then display on 'list_in' in place of 'assignee' under the heading 'Closed By'.  Add an event to the 'Closed' Activity Notification to fire the macro.  If your site allows a closed ticket to be reopened, a ticket might have multiple 'Closed' activity log records.  If that is the case you would have to change the logic in that macro to select all activity logs with type 'CL', loop through the returned records (even though most of the time there will only be one), pick the most recent and take its 'analyst' field.  If you're interested in this alternative please let me know and I'll add some more detail.

    Regards,

    James



  • 7.  Re: Modifying list_in Form File

    Posted 07-05-2018 10:16 AM

    Thanks for the information, I want to try and see if I can do this with the least amount of customization first and if no success then i may need to reach out for more details on the above.



  • 8.  Re: Modifying list_in Form File

    Broadcom Employee
    Posted 07-13-2018 02:18 PM

    TheKatherine 

     

    Do you have any additional questions regarding this topic?

     

    If not, please mark one of the provided answers as Correct so that this thread can be closed.



  • 9.  Re: Modifying list_in Form File
    Best Answer

    Posted 07-13-2018 03:10 PM

    With some help from a friend and consultant who is working with my me and my company on upgrading our Service Desk environment I ended up doing the following in the list_in.htmpl file:

    • created function to suppress the closed by attribute unless the status is closed

    var ticket_status;
    function showCloser(value)
    {
    if (ticket_status == "CL") {
    rs.data(value);
    } else {
    rs.data("");
    }
    }

    • added/updated lines to reference the function

    <PDM_MACRO name=lsWrite text="ticket_status = '@list.status';"> 

    <PDM_MACRO name=lsCol hdr="Closed By" attr="last_mod_by" exportHdr="Closed By" startrow="no" fmtfunc=showCloser>

     

    thank you

    Katherine