Home > Forum > Processes > Calculate SLR in days

Calculate SLR in days
0

Hi, we have a requirement to calculate no.of days took to complete an assigned task.
Created a business rule with below code:


select count(*) as BusinessDays from Calendars where cal_isworkingday = 1
and cal_workingdate >'{BRP:26}' /*starting date*/
and cal_workingdate < '{BRP:27}' /*exit date*/

BRP:26 and BRP:27 are business rule paremeters.
BRP:26 will be capturing on entry of the step.
BRP:27 will be capturing on exit of the step path.

Attached the screenshot of the action added on the path but the SLR is not getting calculated.

MVP

Hi kaluser,

I'm replying from my mobile so I can't make Screenshots and can't verify a few thinks.

In your case I would do the following :
1. Check the workflow history in admin mode to see whether the action has been executed.
2. If this is the case and no other following action has overwritten the field, I would enable the diagnostic mode and execute the path. I don't remember whether there a difference if you view the results as a normal user or in admin mode, nevertheless I would search the result for a unique value from a query to see which query has been executed. If you don't see it, I would use the SQL Profiler if I have access.
3. Once I have the query I would verify and check whether the executed on returns the expected results.
4. If this is the case it will get tricky but I would need mir information.

Off topic:
You could also check the task assignments table and use the values from the table instead of the parameters.

Best regards,
Daniel