I was able to answer my question using the below code.
$<$text text={{{ [tag{!!title}get[cost]sum[]] }}}/>
I do like the idea of trying that in a macro though. It looks like it could
clean up some of the code if I did it via a macro. Are macro's available
throughout the entire tiddlywiki or are they only available to the tiddler
they're defined in?
Sadly, I still haven't found a nice way to use the draggable method to
reorder task list items, such that I still have a checkbox and number
associated with it but I'll keep looking otherwise. Thanks for the
response, it's given me a bit to think about!
On Tuesday, April 21, 2020 at 2:44:05 PM UTC-4, Mark S. wrote:
>
> 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/26cad5f5-85c0-4b78-8ca9-9fe59319bb34%40googlegroups.com.