Not having the button start the timer

Hi there,

I have leveraged another formula from the community to create a start/stop timer button on a row.

The formula below is from another button “completed” which will stop the timer and change the status to completed.

The challenge I am facing is that if the start/stop timer is not active (which happens a lot by design) then this formula starts the timer.

Can someone please suggest some changes to the formula so that if they timer is NOT running, when I hit this “compelted” button it does not start?

Thanks,

Andy


RunActions(

ModifyRows(thisRow, Tasks.Status, "Completed")


,(If(thisRow.Status = "completed", thisRow.ModifyRows(thisRow.[Is Running], false), // Stops the timer by setting Is Running to false.

// The rest of your existing logic
If(
thisRow.[Is Running],
thisRow.ModifyRows(
thisRow.[Clock Outs], ListCombine(thisRow.[Clock Outs] .IfBlank(List()), Now())
),
thisRow.ModifyRows(
thisRow.[Clock Ins], ListCombine(thisRow.[Clock Ins].IfBlank(List()), Now())
)
))
)

)

Hi ! :smiley:

Maybe you could share a copy of your doc ? Your formulas seems a little bit too complicated for what you describe but maybe I’m missing the big picture.