Negative Values in glide_duration field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2013 06:38 AM
Hi, I have 3 glide_duration fields, the difference of the first two glide duration_fields should be displayed in the 3rd glide_duration field. I have written the the following business rule -
var curr = current.work_effort.getGlideObject().getNumericValue();;
var curr1 = current.effort.getGlideObject().getNumericValue();;
var dif = parseInt(curr1) - parseInt(curr);
current.u_effort_difference.setDateNumericValue(dif);
it is working when "effort" is greater than "work_effort". but my requirement is
if(effort > work_effort)
it need to display the positive difference say 3 days 2 hours (it is working fine with the above code).
and if(effort
it need to display negative difference say -(Minus)3days, 2 hours (this part is not working).
Some one please help me ASAP.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2013 08:17 AM
I believe a duration field cannot display a negative value. You'd need to use a decimal field or something like that, or come up some other visual display indicator to reflect that it should be considered negative.
