0

UPDATE

Hi again,

Unfortunately it doesn't work.

Here's what I've done:

1 - I've created 1 column called "Nr of hours" as Number column with no other settings. This column is included in my Edit Form where I go to put how many hours I worked on something.

2 - I've created another column called "TotHours" as Number column with defalut value 0.

3 - In SPD, I've created a variable called "VarTotHours" as String

4 - Also in SPD, I made a workflow that goes like


Calculate "Nr of hours" plus "TotHours"(output var "VarTotHours") then Set "TotHours" to "VarTotHours"


Set it up to be activated when an item is changed.

Either it doesn't work at all or it multiplies or keeps on adding without sense.

Any idea why?

Thanks in advance.


I have a question:

In a list that we use as ticketing tool, I have a field where I have to input my working hours every time.

Right now we just change the number in the working hours field everytime, but is there a way in which I can just input a number in that field and having another one where all the numbers that I input are being added to?

Thanks in advance!

Laura

  • can you do any example with the numbers and whats the should be? I am not clearly about what have you written, thanks. – Zdeněk Vinduška Jan 16 at 9:30
  • I know, sorry, it's difficult to explain :P So, let's say I have the field WORKING HOURS. Everytime I work on my ticket (in Edit Form), I input the hours spent on it (let's say 1 today, tomorrow 1,5 and the day after tomorrow 0,5). Is there a way to create an additional column that calculates what I input in the working hours column every time? Hope it's clearer now, Thanks! – Laura Jan 16 at 9:31
  • so try it with numbers what you want to achieve – Zdeněk Vinduška Jan 16 at 9:33
1

This is not possible using Calculated columns as calculated columns does not allow circular reference(reference to same column itself).

Solution:

However you can achieve this easily using Workflow.

You can implement one workflow on item created and changed events and calculate the Total working hours each time you edit the list item.

Update:

You can create a SharePoint designer 2013 list workflow on your list.

  1. Create two number fields NoOfHoursWorked and TotalHoursWorked. Set default value of this column to 0.
  2. Create SharePoint designer 2013 List workflow on On create and edit events.
  3. In your workflow use Calculate action to perform addition of NoOfHoursWorked and TotalHoursWorked.
  4. Update TotalHoursWorked field with the result of the addition.

For Reference: In below example they have used calculate action for multiplication, similary you can use for addition.

How to perform Calculations in workflow

  • Ah ok, thank you!!! This helps a lot!!! How would you build it? Like, which actions would you use? Thank you again! – Laura Jan 16 at 10:09
  • welcome. please upvote and accept the answer if it helped you. – Ganesh Sanap Jan 16 at 10:46
  • Done and thank you again!! It seems to be working :) – Laura Jan 16 at 15:46
  • I've updated my original post...can somebody help me? :) – Laura Feb 12 at 9:41
  • please create new question and refer this old question in your new question. – Ganesh Sanap Feb 12 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.