CA Service Management

Expand all | Collapse all

Custom Field issue

  • 1.  Custom Field issue

    Posted Aug 15, 2017 09:54 AM

    Hello Team

     

    we have added Projected Violation field on detail_in htmpl file but its not showing the date time in it. However on list_in htmpl file its showing the record for the same incident but not in the incident form. 

     

    What could be issue?

     

    Please advise

     

     

     

     

     



  • 2.  Re: Custom Field issue

    Broadcom Employee
    Posted Aug 15, 2017 10:19 AM

    Armir, you mean predicted_sla_violation attribute? Please copy and paste the detail_in.htmpl part that you added to

    display the field so community users can know exactly how you did it. Thanks _Chi



  • 3.  Re: Custom Field issue

    Posted Aug 15, 2017 10:38 AM

    Hi Aamir,

    In WSP, is the field pointing to the same table/column?  Look at the list form in WSP and open that field, and then do the same on the detail form and compare them.  I have a feeling its pointing to the incorrect table/column...

    Jon



  • 4.  Re: Custom Field issue

    Posted Aug 15, 2017 11:08 AM

    Hi Jon & Chen

     

    See below. in list_in htmpl file.. Projection violated attribute is 'mintime' . This attribute is present in 'in (Incident)' table

     

     

     

     

     

     

    SO, on detail_in htmpl file. I used same attribute but no date time showing 

     

     

     

     

     



  • 5.  Re: Custom Field issue

    Broadcom Employee
    Posted Aug 15, 2017 11:27 AM

    mintime is local:

     mintime              LOCAL DATE

    I don't think you can use LOCAL attributes in detail forms



  • 6.  Re: Custom Field issue

    Posted Aug 15, 2017 11:47 AM

    then how can i achieve this ? We need to see violation projected field on

    detail_in form same as it shows on list_in

     

    On 15-Aug-2017 8:28 pm, "Chi_Chen" <communityadmin@communities-mail.ca.com>



  • 7.  Re: Custom Field issue

    Posted Aug 15, 2017 12:05 PM

    Hi,

     

    This should work, double check the form group associated with that role.  You may need to modify one or more detail_in forms.



  • 8.  Re: Custom Field issue

    Posted Aug 15, 2017 12:18 PM

    Can u please elaborate

     

    On 15-Aug-2017 9:06 pm, "gbruneau" <communityadmin@communities-mail.ca.com>



  • 9.  Re: Custom Field issue

    Posted Aug 15, 2017 12:50 PM

    Can you share a screenshot of the field on the detail_in form?  Chi is probably correct in that local dates will not work, but i'd like to double check that your form group is updated correctly.



  • 10.  Re: Custom Field issue

    Posted Aug 15, 2017 02:57 PM

    hi grant

     

    screenshot already shared above.pls have a look

     

    On 15-Aug-2017 10:13 pm, "gbruneau" <communityadmin@communities-mail.ca.com>



  • 11.  Re: Custom Field issue

    Posted Aug 15, 2017 03:03 PM

    You're screenshot of the detail_in form doesn't have the Projected Violation field in it, which makes me think you didn't update the correct form group.



  • 12.  Re: Custom Field issue

    Posted Aug 16, 2017 02:19 AM

    Hi.
    My understanding

     

    I see the following line in list_in.htmpl

    <PDM_MACRO name=lsCol hdr="Projected Violation" attr=mintime>


    The used attribute here is using "mintime" as the attribute to display.

     

    In this specific case the attribute name does not access the  attribute of the current ticket object, but an attribute of the so called domset which is used to fetch the data from DB, in this case the domset "in_list_web", which is defined as:

    DOMSET in_list_web "open_date DESC, id DESC, mintime=min(attached_slas.time_to_violation), mintgt=min(target_times.target_time), status=status.sym, priority=priority.sym DESC, ref_num" "" STATIC ;

     

    This is a very special construct to be able to use an aggregate function "min()" directly in the select statement which is sent to the physical DB.

     

    Conclusion:
    the mintime column in the list view displays an agreggated value fetched from the database ("the smallest value of all time_to_violation of all attached sla's).
    I don't think that the same logic can be used in a detail view.
    You dont have a domset context there but only a single object context and so you would only be able to directly access the mintime attribute of the ticket object, which is only a local attribute defined as:

    mintime         LOCAL   DATE { ON_DB_INIT SET 0; } ;

     it has no logic, except the intialization with "0".

     

    you might be able to do similar value fetches with a pdm_list in your detail_view to calculate the minimun value, and then display it in a readonly field. Something like

    var local_mintime=0;
    <pdm_list prefix=mintimelist factory=attached_slas where="_mapped_cr='$args.persistent_id' and time_to_violation is not null">
    if(local_mintime==0 || $mintimelist.time_to_violation < local_mintime) local_mintime=$mintimelist.time_to_violation;
    </pdm_list>
    detailTextboxReadonly("Projected Violation","dummy1",1,local_mintime,"");

    ! not tested !

     

    Another idea:
    please check, to use "predicted_sla_violation" instead "mintime" like Chi_Chen already suggested, in your detail view. It might already display what you are looking for.

     

    Regards
    ..........Michael



  • 13.  Re: Custom Field issue

    Posted Aug 17, 2017 06:10 AM

    Hi Aamir,

     

    Did you see my last update on one of your other threads\posts (Request on ca sdm)?

     

    I'm still trying to figure out why you need to duplicate this when similar info is the 'Service Type' tab of the ticket?

     

     

    Kind Regards,

    Brian



  • 14.  Re: Custom Field issue

    Posted Aug 22, 2017 06:23 AM

    Hi Brian

     

    Yeah I saw you reply there. Actually customer requested this to be on same page without clicking here n there. Hope you understand.



  • 15.  Re: Custom Field issue

    Posted Aug 22, 2017 06:21 AM

    Hi Micheal & Chi Chen

     

    I have selected time_to_violation attribute and now its showing date n time in projected violated field.

     

    Thankyou



  • 16.  RE: Re: Custom Field issue

    Posted Jan 09, 2020 07:59 AM

    Hi Aamir,

    how you did that?