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