Hey guys.
I’m having a little problem with calculated fields and SharePoint 2013 Workflow.
I’ve a variable named ‘vLondonContractHours‘ and have set it like so;
Set time as 9:0 for Current Item: Created (Output to Variable: vLondonContractHours)
Then I was able to…
Set Daily Contract Hours to Variable: vLondonContractHours
…this gives 09:00 hours which is correct. Now, I want to multiply this by 5 and Update an Item (where the item column is called ‘Weekly Contract Hours’). However using the following action doesn’t work;
Add 0 months, 5 days, 0 hours, 0 minutes to Variable: vLondonContractHours (Output to Variable: vLondonWeeklyContractHours)
The problem is that this doesn’t work. I’ve also created a number column and set a default value of 5 (for 5 days). Then I created a Calculated Column named ‘Weekly Contract Hours’ with the formula;
=[Daily Contract Hours]*5,”h:mm”)
The produces an error in the workflow where the calculation is made.
In short I want to multiply one date and time column which is set from an internal variable by another number column which is set to number 5.
Your help will be appreciated.
Thanks, Larry
I don’t think using a datetime column will work for this scenario. The 9:00 you are receiving in the first calculation equals 9:00 a.m. and not a total hours of 9. If you add 5 days to 9:00 a.m. it will just take you to 5 days later at 9:00. If you want to calculate 45 hours per week you will need to use a number column to get that type of calculation.