0
votes

I recently created a holiday approval form and workflow on SharePoint. It works fine, however our HR department are having to update peoples "remaining days" as I cannot work out how to update this through the workflow.

I have an InfoPath form on SharePoint and use SharePoint designer for my workflow. What it is, is someone would request a holiday through the form. For example, lets say someone asked for 4 days off and they have a balance of 20 days. What we want is for this to update their "remaining days" to 16 whilst on Pending Approval.

If the holiday request is rejected, is it possible to then add the 4 back on... since these wont be used. So now their remaining days will be 20 days again.

If it is approved however, i would like for the "remaining days" to stay at 16.

I hope this makes sense. I have read through a lot of sites trying to find the answer, but SharePoint designer workflow goes beyond my understanding when I add "update list".

Any help is appreciated,

Thanks Jamie

1

1 Answers

0
votes

I imagine that both Balance and the number of requested days are metadada, so in SharePoint Designer Workflows, first of all you should do the calculation using the action "Calculate": enter image description here

After the calculation, you'll use the action "Update Item", to update the current item, and for the field "Balance" you set the output variable "calc" from the previous action: enter image description here