Formulas Plugin issue

I have always had success using the Formulas Plugin before, but this stymies me. I am trying to create a kind of time-clock for my work.

I’ve created a tiddler for each day of the week, and created the following fields, in addition to field for times in and out.

hours: (=({{!!out1}}-{{!!in1}})+({{!!out2}}-{{!!in2}})+({{!!out3}}-{{!!in3}})=)
or-wa-hours:(={{!!or-wa-out}}-{{!!or-wa-in}}=)
non-billable: (={{!!non-billable-out}}-{{!!non-billable-in}}=)
total: (={{!!hours}}+{{!!or-wa-hours}}+{{!!non-billable}}-{{!!break}}=)

It works good, so far…
image

Then I try to tie it all together on another tiddler:
!!Total: (={{Monday!!total}}+{{Tuesday!!total}}+{{Wednesday!!total}}+{{Thursday!!total}}+{{Friday!!total}}+{{Saturday!!total}}+{{Sunday!!total}}=)

but it just shows “0”

fyi, yes, I have been told that there’s now something better than the Formulas plugin, but I’ve never gotten around to learning it. But mainly, this is a puzzle that I want to resolve, for the fun of it.

Any help is appreciated.

I think you must have a typo somewhere (though I can’t see one). I just tried a basic version of your calc on the demo website at Formulas for TiddlyWiki — spreadsheet-inspired number crunching and it works fine:

Thanks for checking, CodaCoder. I notice that you put spaces before and after the + signs. Is that necessary?

What’s odd is, this works:
image
…but when I put the brackets around it, it just shows 0, but no error message - like it thinks it’s doing it right
image

Like CodaCoder, I tinkered with versions of what you’re doing, and found nothing misbehaving.

I recommend you drag all your tiddlers over to the Formulas site, and see how they behave there. (If you tag all your related tiddlers with a tag such as “Test” then you can just drag that tag pill over.)

Also a recommended troubleshooting step: try breaking that final total equation down to various elements or simpler constellations, to isolate which element in the complex string seems responsible for the glitch.

If you follow up with details here again, it’d be ideal if you can paste your actual typed sequence in (between triple-backticks) so that it’s easy to troubleshoot your actual typed strings rather than reconstructing from a screenshot.

Everyone knows, on the interwebz and in WiddlyTiki spaces absolutely definitely 100% without a shadow of doubt, don’t matter at all. (Except when they do) :stuck_out_tongue_winking_eye:
I’m with @Springer . Split the problem up. Build it slowly on the demo site. Prove every assumption works.

I’m not a gamboling man (that would be my Dad you’re think of) but I’d bet it’s a dumb typo… somewhere.

Done. Here’s my text for the timesheet totals:

(=
{{Monday!!total}}+
{{Tuesday!!total}}+
{{Wednesday!!total}}+
{{Thursday!!total}}+
{{Friday!!total}}+
{{Saturday!!total}}+
{{Sunday!!total}}
=)

This just displays “0”, but if I remove the (= and =) like this:

{{Monday!!total}}+
{{Tuesday!!total}}+
{{Wednesday!!total}}+
{{Thursday!!total}}+
{{Friday!!total}}+
{{Saturday!!total}}+
{{Sunday!!total}}

…it displays “0.5+ 4+ 8+ 5.35+ 3.7+ 5.2+ 0”
So everything works up to that very last change. Which means the problem can’t be anything before that (?)

Here’s the text that feeds into this. Each of the day tiddlers have the same text.



Billable Hours for Oregon/Washington: {{!!or-wa-hours}} hrs

 Break: {{!!break}} hr

Non-billable hours:  {{!!non-billable}} hrs

Total: {{!!total}}

and the following formula fields

hours: (=({{!!out1}}-{{!!in1}})+({{!!out2}}-{{!!in2}})+({{!!out3}}-{{!!in3}})=)
non-billable: (={{!!non-billable-out}}-{{!!non-billable-in}}=)
or-wa-hours: (={{!!or-wa-out}}-{{!!or-wa-in}}=)
total: (={{!!hours}}+{{!!or-wa-hours}}+{{!!non-billable}}-{{!!break}}=)

…and here’s all the fields total for each day

Hope this helps. I really appreciate all the great feedback. Thanks!

1 Like

I know how frustrating things are when the thing “just doesn’t seem to work.”

This is still a lot to troubleshoot, given that everything does work for us (as far as we can tell) on the original site. I fear I’ll replicate everything on that site, and not find your problem.

Did you yourself try the step of dragging all your tiddlers to that original formulas site, to see how they behave there?

If your whole set of related tiddlers hit the same failure point at that bare-bones site, then I’d be happy to help you troubleshoot further.

But if they behave properly there, then the glitch in your wiki file is some other kind of interference (some additional plugin, some stray bit of code somewhere) that we wouldn’t be able to guess from here.

Another path for troubleshooting: set up a model of your problem at tiddlyhost, on a public site (make it external-core, so as not to waste server space).

Best regards!

@morgainebrigid

Gotta say it, this looks pretty solid to me…

:confused:

Note the inter-field calcs too, which better covers your use case.