How are you building your table? It's possible to build it with nested 
lists, making the entirety automated. But I digress.

You probably want a macro

So at the top of your tiddler you might have this:

\define cost(expense) $<$text text={{{ [tag[$expense$]get[cost]sum[]] }}}/>

which can be invoked like this:

<<cost "Car Repair">>

and changed around for other costs by handing it a different parameter:

<<cost "Fuel">>

<<cost "Registration">

etc.


On Tuesday, April 21, 2020 at 10:41:46 AM UTC-7, Reaktorblue wrote:
>
> Hello,
>
> I'm working on a project and had a few questions. I have several tiddlers 
> listed as categories and tasks of that category.
>
> For example, I may have:
>
>
>    - tiddler title: Car Repair
>    - tiddler tag: Category
>
>
>    - tiddler title: Oil Change
>    - tiddler tag: Car Repair
>    - tiddler field: cost, value: 30.00
>
>
>    - tiddler title: New Tires
>    - tiddler tag: Car Repair
>    - tiddler field: cost, value: 300.00
>
>
>    - tiddler title: New Passenger Side Mirror
>    - tiddler tag: Car Repair
>    - tiddler field: cost, value: 60.00
>    
>
> 1) I'm using the following to return $390.00 when viewing the "Car Repair" 
> tab which indicates three tiddlers, "Oil Change", "New Tires", and "New 
> Passenger Side Mirror"
>
> Total Cost: $<$text text={{{ [tag<currentTab>get[cost]sum[]] }}}/>
>
> The code works perfectly however, in another tiddler, I made a table to 
> show me all the categories. Is it possible to change the code so the table 
> indicates the sum of the cost field of all the tiddlers tagged with the 
> title of the tiddler listed in that row? For example, my table should have 
> a row indicating "Car Repair" as the tiddler title the next cell I would 
> like to have should indicate the total sum of cost, from all the tiddlers 
> tagged "Car Repair". I believe the following will work however, I was 
> hoping to not explicitly assign it to "Car Repair" so that it will update 
> for all rows that the table generates.
>
> $<$text text={{{ [tag[Car Repair]get[cost]sum[]] }}}/>
>
> 2) Is it possible to use an ordered list when using the 
> list-links-draggable macro instead of an unordered list or is it possible 
> to use list-links-draggable with a table so that the table rows are 
> draggable too?
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9d5cef2a-8842-448e-9702-7d8a5f3ac72e%40googlegroups.com.

Reply via email to