
So the scenario is as follows: I need to capture the amount of time when a checkbox is ticket. That checkbox will be flagged and unflagged several times, so I need a field to present the sum of time when the checkbox remains flagged overall.
Let's say the checkbox is flagged at 12:05 and unflagged at 12:10, then reflagged again at 12:15, then unflagged again at 12:20. The field would then need to present the amount of time as 10 minutes.
Can this be done?
Thank you!
12 risposte
Hi Razvan,
- Create Two Datetime fields
- CheckboxCheckedTime
- CheckboxUnCheckedTime
- Create a Number field with 0 Decimal Places : Duration
- Create 3 Workflow Field updates
- Update CheckboxCheckedTime with NOW()
- Update CheckboxUnCheckedTime with NOW()
- Update Duration field with Formula
(CheckboxUnCheckedTime__c - CheckboxCheckedTime__c ) *1440 +IF(ISBLANK(Duration__c) , 0 , Duration__c)
- Create 3 Workflow Rules
- Update CheckboxCheckedTime
- Evaluation Criteria : Created and Everytime it's edited
- Rule Criteria: Formula
AND( Checkbox__c, NOT(PRIORVALUE(Checkbox__c)))
- Choose field update to Update CheckboxCheckedTime
- Update CheckboxUnCheckedTime
- Evaluation Criteria : Created and Everytime it's edited
- Rule Criteria: Formula
AND( NOT(Checkbox__c), PRIORVALUE(Checkbox__c) )
- Choose field update to Update CheckboxUnCheckedTime
- Update Duration
- Evaluation Criteria : Created and Everytime it's edited
- Rule Criteria: Formula
ISCHANGED(CheckboxUnCheckedTime__c)
- Choose field update to Update Duration field
- Update CheckboxCheckedTime
- Create Two Datetime fields