susanna123
Technical User
I have a formula field that calculates the totals or sums the elapsed time. I would like to highlight or create a formatting field that will highlight all elapsed times that are greater than 25 minutes.
This is my formula field for elapsed time at the group footer:
Local NumberVar sec := Sum ({@Elapsed - Number}, {AP_FinishedInstances.SI_Name}) ;
Local NumberVar hrs := Truncate(Remainder(sec,86400)/3600);
Local NumberVar mns := Truncate(Remainder(sec,3600)/60);
Local NumberVar scs := Remainder(sec,60);
ToText(hrs,"00") + ":" + ToText(mns,'00') + ":" + ToText(scs,'00')
I created a formatting formula for font color at the detail level:
This is the code:
if {@Elapsed - Number} > Average ({@Elapsed - Number}, {AP_FinishedInstances.SI_Name})
then crTeal
else
if {@Elapsed - Number} > '00:25:00' then crRed
//if {@Elapsed - Number} < Sum ({@Elapsed - Number}, {AP_FinishedInstances.SI_Name})
//then crRed
Can you tell me what I am doing wrong and how I can correct this?
thanks
This is my formula field for elapsed time at the group footer:
Local NumberVar sec := Sum ({@Elapsed - Number}, {AP_FinishedInstances.SI_Name}) ;
Local NumberVar hrs := Truncate(Remainder(sec,86400)/3600);
Local NumberVar mns := Truncate(Remainder(sec,3600)/60);
Local NumberVar scs := Remainder(sec,60);
ToText(hrs,"00") + ":" + ToText(mns,'00') + ":" + ToText(scs,'00')
I created a formatting formula for font color at the detail level:
This is the code:
if {@Elapsed - Number} > Average ({@Elapsed - Number}, {AP_FinishedInstances.SI_Name})
then crTeal
else
if {@Elapsed - Number} > '00:25:00' then crRed
//if {@Elapsed - Number} < Sum ({@Elapsed - Number}, {AP_FinishedInstances.SI_Name})
//then crRed
Can you tell me what I am doing wrong and how I can correct this?
thanks