Re: Can anyone help with the spreadsheet-like calcuations plugin by Evan Balister?

92 views
Skip to first unread message
Message has been deleted

BurningTreeC

unread,
Jun 17, 2018, 7:35:05 AM6/17/18
to TiddlyWiki
Hi,

does it work if you remove the quotes before "(=" and after "=)" ?

mervin mecklenburg

unread,
Jun 17, 2018, 9:55:44 AM6/17/18
to TiddlyWiki


On Sunday, June 17, 2018 at 5:10:22 AM UTC-6, mervin mecklenburg wrote:

Can anyone help me with the plugin authored by Evan Balister that facilitates spreadsheet-like calculations? This is a fantastic plugin. It allows me to perform tasks that would have been difficult before the plugin came around. However, I have encountered a problem that has defied my best efforts, though it appears simple.


I am using the plugin to render a series of invoices. Each invoice contains a table of information about individual accounts. One table column in each invoice contains numbers representing dollar figures, and employing the formula plugin I use a filter expressions to summarize these numbers into a running total, as described in the plugin's documentation. This part of the process works well, and the plugin functions as the documentation describes.


But I also wish to summarize the results from the individual invoices creating an overall total of all of the accounts, and this is where I get stuck. I believe that I could render a summary if I could pass the totals calculated in the individual accounts to variables or to fields, but I have not found a way to do that.

Here is the code as I now have it:


<$formula-vars
catch="(= sum([tag{!!reference}tag[TrustA]has[time]get[charge]]) =)">

<<catch>> {{!!total}}


<$button>
<$action-setfield $tiddler=<<currentTiddler>> $field='total' $value=<<catch>>/> Set Total </$button>

</$formula-vars>
 

The filter (= sum([tag{!!reference}tag[TrustA]has[time]get[charge]]) =) successfully renders the summary that I need in the individual invoices. However, $formula-vars widget I use here won't pass the value rendered by the list function on to the variable. If I substitute the list referenced above with a simple math function, such as (= 2+3*4 =), then the calculated value passes to the variable, and the approach seems to work, but the $forumula-vars widget does not appear to work with filters. I am either missing a step, or I need to find another approach.


Does anyone have any ideas?

mervin mecklenburg

unread,
Jun 17, 2018, 9:59:03 AM6/17/18
to TiddlyWiki
Thank you for the reply.  Removing the quote does not appear to help.  I don't get an error message, but the widget does not work as I had hoped.

Merv

BurningTreeC

unread,
Jun 17, 2018, 10:28:41 AM6/17/18
to TiddlyWiki
Thank you for the reply.  Removing the quote does not appear to help.  I don't get an error message, but the widget does not work as I had hoped.

Merv



I tried your code without quotes on the formula plugin webpage and it worked for me - I made some tiddlers with the tags TrustA and the reference tag, made the fields time and charge and put some values into charge.
The result was that the variable "catch" holds the sum of all "charge" fields.
The code works, there may be something else not working correctly 

TonyM

unread,
Jun 17, 2018, 10:30:42 AM6/17/18
to TiddlyWiki
Merv

I cant see the original question or sufficent detail but always pays to brake the problum down into its parts and test you assumptions starting with the part you think is broken.

Create new tiddlers and test your assumptions.

Regards
Tony

Mark S.

unread,
Jun 17, 2018, 3:32:23 PM6/17/18
to TiddlyWiki
You're using the wrong syntax.  Keep the quotes but get rid of (= and =) . See Evans documentation for details.

--Mark

mervin mecklenburg

unread,
Jun 17, 2018, 4:48:08 PM6/17/18
to TiddlyWiki
That did the trick.  Thanks.

Merv
Reply all
Reply to author
Forward
0 new messages