I need some help with below requirement.
We have an existing formula field(Text) - InactiveTime__c on standard object which calculates the duration the record was inactive based on lastmodifieddate field. When the record is updated this time will be set 0 mins. But when a particular field - Fieldabc__c is changed we shouldn't reset the time(DO NOTHING). I tried this by creating two fields - checkbox(isFieldABCChanged__c), Text(Inactivetimehidden__c) and a process builder. In process builder, when Fieldabc__c is changed I'm setting isFieldABCChanged__c to true and Inactivetimehidden__c with PRIORVALUE(InactiveTime__c). when Fieldabc__c is not changed I'm setting isFieldABCChanged__c to false.
Now, in the formula field I added a conditional statement as
IF(isFieldABCChanged__c, Inactivetimehidden__c, Existing time evaluation logic)
When Fieldabc__c is modified, formula field will be updated with the value from Inactivetimehidden__c but the time doesn't keep counting because formula evaluation is in realtime and as isFieldABCChanged__c will always be true until some other field is updated. Is there any better approach to solve this issue ?