[tw5] TEST: Codes in Google Group and Talk

2021-12-16 Thread Mohammad
Symptom

If you write codes in your post in Google Group, it may be displayed 
wrongly when is fetched by Tiddlywiki Talk and is displayed in Talk Forum!

It seems if one wraps codes in codeblock e.g. triple backticks, they will 
be shown correctly in Talk!

Example i
Code wrapped in backticks

```
<$vars thisDynamicFilter={{{ 
[fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>
<$list filter={{{ [] }}}>
''total:'' <>


```

Example ii
Code is NOT wrapped in backticks
<$vars thisDynamicFilter={{{ 
[fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>
<$list filter={{{ [] }}}>
''total:'' <>



Open GG and Talk and compare the result!


-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ddd34843-f116-4f44-942b-feb603c4dad0n%40googlegroups.com.


Re: [tw5] One approach: summing untold number of fields from untold number of tiddlers

2021-12-16 Thread Mohammad
In my own solution I actually used 

```
''total:'' <$text text={{{ [fields[]regexp[aaa]] 
:map[all[tiddlers]get] +[sum[]] }}}/>
```
and I got 1077!!! The source of error was two tiddlers have field `aaa2` 
and my filter accounted for one! because the way `:map` works!!

On Friday, December 17, 2021 at 9:27:37 AM UTC+3:30 Mohammad wrote:

>
>> [fields[]regexp[aaa]] :map[all[tiddlers]getsum[]] +[sum[]]
>>
>>
>> or to match your output:
>>
>> ''total:'' <$text text={{{ [fields[]regexp[aaa]] 
>> :map[all[tiddlers]getsum[]] +[sum[]] }}}/>
>>
>>
>>>
> Brian,
>
> This is a bit tricky! I did myself before I saw your solution and I got 
> wrong total sum! The reason was
> :map returns one result per input (e.g. the input it receives from 
> [fields[]regexp[aaa]], its upstream filter run)
> Your trick here is you have used sum twice! and I think here it makes 
> sense, as you are calculating sum of sum or total sum!
> Nice solution! Worth to be documented!
>
> Best wishes
> Mohammad
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/df2c478c-645f-4e40-8d81-d3e5e6b6c2e3n%40googlegroups.com.


Re: [tw5] One approach: summing untold number of fields from untold number of tiddlers

2021-12-16 Thread Mohammad

>
>
> [fields[]regexp[aaa]] :map[all[tiddlers]getsum[]] +[sum[]]
>
>
> or to match your output:
>
> ''total:'' <$text text={{{ [fields[]regexp[aaa]] 
> :map[all[tiddlers]getsum[]] +[sum[]] }}}/>
>
>
>>
Brian,

This is a bit tricky! I did myself before I saw your solution and I got 
wrong total sum! The reason was
:map returns one result per input (e.g. the input it receives from 
[fields[]regexp[aaa]], its upstream filter run)
Your trick here is you have used sum twice! and I think here it makes 
sense, as you are calculating sum of sum or total sum!
Nice solution! Worth to be documented!

Best wishes
Mohammad

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/64d540ee-56ca-4775-bcb4-4933be5cc05cn%40googlegroups.com.


Re: [tw5] One approach: summing untold number of fields from untold number of tiddlers

2021-12-16 Thread Mohammad
It is strange, what I see here in GG is different from what is fetched in 
Talk!
I think codes need to be wrapped in codeblock!

@admins please have a look!

On Friday, December 17, 2021 at 7:38:28 AM UTC+3:30 brian@gmail.com 
wrote:

> Charlie,
>
> For more good fun, I wondered if the dynamic filter part of your solution 
> could be implemented using the new filter features of 5.2.0. Here's what I 
> came up with that seems to work:
>
> [fields[]regexp[aaa]] :map[all[tiddlers]getsum[]] +[sum[]]
>
>
> or to match your output:
>
> ''total:'' <$text text={{{ [fields[]regexp[aaa]] 
> :map[all[tiddlers]getsum[]] +[sum[]] }}}/>
>
>
> Brian
>
> On Thu, Dec 16, 2021 at 10:28 AM Charlie Veniot  wrote:
>
>> *Dynamic creation of filters !!!*
>>
>> Say that one has an untold number of numeric fields spread throughout a 
>> TiddlyWiki instance, all of those fields having names that match a pattern.
>>
>> (For example: say all of the fields have "aaa" in their names.)
>>
>> And say any one tiddler can have an untold number of those fields (0 to 
>> many).
>>
>> How would we go about summing all of these fields, specifying only a 
>> pattern for field names, and without knowing which tiddlers have those 
>> fields?
>>
>> As an exercise, here's my approach.  Download attached and drag into 
>> TiddlyWiki.com for study.
>>
>> For convenience, here is the code of interest:
>>
>> 
>>
>> \define p1() [get[
>> \define p2() ]]
>> \define p3() +[sum[]]
>>
>> <$list variable="thisField" filter="[fields[]regexp[aaa]]">
>> sum of <> values:
>> <$list filter="[getsum[]]">
>> {{!!title}}
>> 
>> 
>> *<$vars thisDynamicFilter={{{ 
>> [fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>*
>> <$list filter={{{ *[]* }}}>
>> ''total:'' <>
>> 
>> 
>>
>> 
>>
>> Good fun !
>>
>>
>> -- 
>> 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 tiddlywiki+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/cc29ad8a-6b8e-43b9-889e-98761cd86532n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f8ea1e45-4128-407d-a503-0b21492d8ebdn%40googlegroups.com.


[tw5] Re: Javascript non-macros

2021-12-16 Thread Louis Davout
Thanks, I will look at creating custom widgets.

If what I want to do is simple, such as set a field to a constant value, 
yea sure I can do that. But once something involves complex logic I often 
get stymied. It seems every time I gain an insight into how TW works, I 
discover it doesn't work as I thought. At this point I have become 
incredibly frustrated. I find the syntax inconsistent with too many 
exceptions plus when and how to "hook together" different code types 
(macros, widgets, etc). https://groktiddlywiki.com & 
https://anthonymuscio.github.io/#Standard%20Nomenclature have been helpful 
but it is eluding my understanding. Despite javascript's own quirks, at 
least it makes sense to me.

On Thursday, December 16, 2021 at 11:00:07 AM UTC-5 PMario wrote:

> On Thursday, December 16, 2021 at 4:24:14 PM UTC+1 davou...@gmail.com 
> wrote:
>
>> The dev documentation 
>>  states 
>> "Macros are just used to return a chunk of wikitext for further processing. 
>> They should not make modifications to tiddlers in the wiki store."
>>
>
> The main reason, why macros shouldn't have side effects is, that they 
> don't have a .refresh() function of their own. They are refreshed by 
> "parent" widgets. 
>
> So if you want to implement your own functionality, that survives a page 
> refresh you need to create widgets. 
>  
>
>> Is there a hook point where I can have my own js code that can modify 
>> tiddlers?
>>
>
> Widgets.
>  
>
>> Basically I want to be able to set field values from js. As I'd much 
>> rather use js than the conglomerate that is wikitext, widgets, filters, and 
>> macros.
>>
>
> It depends on what you really want to do. If you just want to change some 
> fields you are probably a 100 times faster to get stuff done if you use the 
> existing wikitext functionality. 
>
> If you just want to see how the TW internals work you could have a closer 
> look how widgets work. 
>
> In TW everything is driven by the "refresh" mechanism, which is 
> automatically triggered as soon as you change a tiddler content in the 
> store. 
>
> Changes to the tiddler store are usually driven by user interaction with 
> "buttons" and "action widgets". .. So user actions change the tiddler 
> content, which in turn automatically updates the UI. ... 
>
> The internal tiddler store is immutable. So changing tiddlers is only 
> possible writing a completely new tiddler. Overwriting a tiddler is done in 
> the following way. -- read tiddler content -- modify the content -- write 
> tiddler with the same or a new title. Once the store is updated a "change" 
> event is fired by the core. All widgets that depend on the tiddler content 
> that has been changed, trigger their .refresh() function, which may write 
> new HTML output to the DOM. 
>
> ... So it really depends, what you want to do. .. If you could be more 
> specific about your usecase, I could probably point you in the right 
> direction in the core code. 
>
> -mario
>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fba0883c-5824-437f-8db4-c2735049932dn%40googlegroups.com.


Re: [tw5] One approach: summing untold number of fields from untold number of tiddlers

2021-12-16 Thread Brian Theado
Charlie,

For more good fun, I wondered if the dynamic filter part of your solution
could be implemented using the new filter features of 5.2.0. Here's what I
came up with that seems to work:

[fields[]regexp[aaa]] :map[all[tiddlers]getsum[]] +[sum[]]


or to match your output:

''total:'' <$text text={{{ [fields[]regexp[aaa]]
:map[all[tiddlers]getsum[]] +[sum[]] }}}/>


Brian

On Thu, Dec 16, 2021 at 10:28 AM Charlie Veniot  wrote:

> *Dynamic creation of filters !!!*
>
> Say that one has an untold number of numeric fields spread throughout a
> TiddlyWiki instance, all of those fields having names that match a pattern.
>
> (For example: say all of the fields have "aaa" in their names.)
>
> And say any one tiddler can have an untold number of those fields (0 to
> many).
>
> How would we go about summing all of these fields, specifying only a
> pattern for field names, and without knowing which tiddlers have those
> fields?
>
> As an exercise, here's my approach.  Download attached and drag into
> TiddlyWiki.com for study.
>
> For convenience, here is the code of interest:
>
> 
>
> \define p1() [get[
> \define p2() ]]
> \define p3() +[sum[]]
>
> <$list variable="thisField" filter="[fields[]regexp[aaa]]">
> sum of <> values:
> <$list filter="[getsum[]]">
> {{!!title}}
> 
> 
> *<$vars thisDynamicFilter={{{
> [fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>*
> <$list filter={{{ *[]* }}}>
> ''total:'' <>
> 
> 
>
> 
>
> Good fun !
>
>
> --
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/cc29ad8a-6b8e-43b9-889e-98761cd86532n%40googlegroups.com
> 
> .
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAO5X8Cxtm9mRZ0YV2ShKDT-LA0utJfkZ2nGtizindHibv7dJrQ%40mail.gmail.com.


Re: [tw5] assigning macro output to a variable

2021-12-16 Thread Brian Theado
CarloGgi,

On Wed, Dec 15, 2021 at 2:02 PM CarloGgi  wrote:

> \define check_feature(feature) [getindex[$feature$]trim[]match[Y]]
>
> <$set name="has_feature" value=<$macrocall $name='check_feature'
> feature='IFTTT'/> >
>   
>   <$list filter="[tag[system]filter]" variable="sys">
><$link to=<>> <>  
>   
>   
>
> 
>
[...]

> <$macrocall $name='check_feature' feature={{!!current_chosen_feature}}/>
>
> where of course field 'current_chosen_feature' wouldbe set by the
> <$select> widget.
>

Filter operators can use transclusions for parameters. That should help
with this case. Something like this (untested):


<$list filter="[tag[system]]
:filter[getindex{!!current_chosen_feature}trim[]match[Y]]" variable="sys">


See https://tiddlywiki.com/#Filter%20Parameter.

Brian

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAO5X8CxPs%2BkYXb9F49xsRdsz-9-RGpgDDZM%3DXj-BoYvGm%3DS51A%40mail.gmail.com.


[tw5] Re: external image handling seems laggy

2021-12-16 Thread Jeremy Ruston
Hi Gavin,

Has anyone implemented a smoother handling of loading and image via 
> _canonical_uri_ in an image widget. Something like a CSS fade animation ?
>

I think we'd need a core modification for that: an additional class for the 
image widget that is only applied when the image is successfully loaded.

I've made a ticket here:

https://github.com/Jermolene/TiddlyWiki5/issues/6346

Best wishes

Jeremy

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f88e0ac9-3884-4d4e-9e3d-5bcd7ddbbd6dn%40googlegroups.com.


[tw5] external image handling seems laggy

2021-12-16 Thread Gavin Gamboa
Has anyone implemented a smoother handling of loading and image via 
_canonical_uri_ in an image widget. Something like a CSS fade animation ?

[img width=400 [my-image]]

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/931b4de7-5827-4f15-9167-c6795a683c78n%40googlegroups.com.


[tw5] Re: Javascript non-macros

2021-12-16 Thread PMario
On Thursday, December 16, 2021 at 4:24:14 PM UTC+1 davou...@gmail.com wrote:

> The dev documentation 
>  states 
> "Macros are just used to return a chunk of wikitext for further processing. 
> They should not make modifications to tiddlers in the wiki store."
>

The main reason, why macros shouldn't have side effects is, that they don't 
have a .refresh() function of their own. They are refreshed by "parent" 
widgets. 

So if you want to implement your own functionality, that survives a page 
refresh you need to create widgets. 
 

> Is there a hook point where I can have my own js code that can modify 
> tiddlers?
>

Widgets.
 

> Basically I want to be able to set field values from js. As I'd much 
> rather use js than the conglomerate that is wikitext, widgets, filters, and 
> macros.
>

It depends on what you really want to do. If you just want to change some 
fields you are probably a 100 times faster to get stuff done if you use the 
existing wikitext functionality. 

If you just want to see how the TW internals work you could have a closer 
look how widgets work. 

In TW everything is driven by the "refresh" mechanism, which is 
automatically triggered as soon as you change a tiddler content in the 
store. 

Changes to the tiddler store are usually driven by user interaction with 
"buttons" and "action widgets". .. So user actions change the tiddler 
content, which in turn automatically updates the UI. ... 

The internal tiddler store is immutable. So changing tiddlers is only 
possible writing a completely new tiddler. Overwriting a tiddler is done in 
the following way. -- read tiddler content -- modify the content -- write 
tiddler with the same or a new title. Once the store is updated a "change" 
event is fired by the core. All widgets that depend on the tiddler content 
that has been changed, trigger their .refresh() function, which may write 
new HTML output to the DOM. 

... So it really depends, what you want to do. .. If you could be more 
specific about your usecase, I could probably point you in the right 
direction in the core code. 

-mario

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fde88708-ca30-43bc-b99d-28c5280ce7e2n%40googlegroups.com.


[tw5] One approach: summing untold number of fields from untold number of tiddlers

2021-12-16 Thread Charlie Veniot
*Dynamic creation of filters !!!*

Say that one has an untold number of numeric fields spread throughout a 
TiddlyWiki instance, all of those fields having names that match a pattern.

(For example: say all of the fields have "aaa" in their names.)

And say any one tiddler can have an untold number of those fields (0 to 
many).

How would we go about summing all of these fields, specifying only a 
pattern for field names, and without knowing which tiddlers have those 
fields?

As an exercise, here's my approach.  Download attached and drag into 
TiddlyWiki.com for study.

For convenience, here is the code of interest:



\define p1() [get[
\define p2() ]]
\define p3() +[sum[]]

<$list variable="thisField" filter="[fields[]regexp[aaa]]">
sum of <> values:
<$list filter="[getsum[]]">
{{!!title}}


*<$vars thisDynamicFilter={{{ 
[fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>*
<$list filter={{{ *[]* }}}>
''total:'' <>





Good fun !


-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/cc29ad8a-6b8e-43b9-889e-98761cd86532n%40googlegroups.com.


SuperDuperSumming.json
Description: application/json


[tw5] Javascript non-macros

2021-12-16 Thread Louis Davout
The dev documentation 
 states 
"Macros are just used to return a chunk of wikitext for further processing. 
They should not make modifications to tiddlers in the wiki store."

Is there such a thing as a Javascript non-macro? Is there a hook point 
where I can have my own js code that can modify tiddlers? Basically I want 
to be able to set field values from js. As I'd much rather use js than the 
conglomerate that is wikitext, widgets, filters, and macros.

Thanks.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/03612a8e-a9c0-4cfe-b03d-d4fbc6988116n%40googlegroups.com.


[tw5] Re: Selectively summing together field values?

2021-12-16 Thread Charlie Veniot

All of your "aaa" fields to be summed are just in the one tiddler.  That 
changes everything.

I thought your "aaa" fields were spread across multiple tiddlers.  Yeah, my 
solution is for a much more complex problem.
On Thursday, December 16, 2021 at 9:04:57 AM UTC-4 Dave Kor wrote:

> Thanks for the info. After looking through my stuff I realized I had 
> already solved this several months ago. The solution is rather simple:
>
> {{{ [[Data]fields[]prefix[aaa]] :map[[Data]get] +[sum[]] 
> }}}
>
> On Thursday, December 16, 2021 at 11:43:16 AM UTC+8 cj.v...@gmail.com 
> wrote:
>
>> ARG!  I forgot to mention, that "regexp" bit might need some tweaking so 
>> that the pattern gets all, but only, the fields you are interested in.
>>
>> On Wednesday, December 15, 2021 at 11:41:18 PM UTC-4 Charlie Veniot wrote:
>>
>>> Hello Dave,
>>>
>>> That is no trivial thing you're trying to do.  Well, maybe somebody has 
>>> a trivial solution.
>>>
>>> But what a great "Brain Age" game !!!
>>>
>>> So in the meantime, download the attached and drag into tiddlywiki.com 
>>> to import the tiddlers and give you an opportunity to study what I've done.
>>>
>>> I've pasted the code below as reference for anything murky that needs 
>>> some serious explaining.
>>>
>>> It is not a trivial affair to require dynamic identification of fields 
>>> that need to be summed.
>>>
>>> Much easier to specify the exact fields.  Then you have a simple filter 
>>> like "[get[aaa1]] [get[aaa2]] ... etc. ... [get[aaaX]] +[sum[]]"
>>>
>>> Since we do not know the exact field names, then we have to dynamically 
>>> build that filter above.  (As per the *highlighted magic* in the code 
>>> below)
>>>
>>>
>>> Ignoring the starting and ending "pre" tags.  I'm trying that to see if 
>>> the code below shows up okay in TiddlyTalk (which is finicky with this kind 
>>> of stuff.)
>>>
>>> 
>>>
>>> \define p1() [get[
>>> \define p2() ]]
>>> \define p3() +[sum[]]
>>>
>>> <$list variable="thisField" filter="[fields[]regexp[aaa]]">
>>> sum of <> values:
>>> <$list filter="[getsum[]]">
>>> {{!!title}}
>>> 
>>> 
>>> *<$vars thisDynamicFilter={{{ 
>>> [fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>*
>>> <$list filter={{{ *[]* }}}>
>>> ''total:'' <>
>>> 
>>> 
>>>
>>> 
>>>
>>>
>>>
>>>
>>>
>>> On Wednesday, December 15, 2021 at 10:40:06 PM UTC-4 Dave Kor wrote:
>>>
 Hello,  I am storing numeric data in tiddler fields and I'd like to 
 select fields that start with lets say "aaa" and sum all their values 
 together. I know I can use filters to select the fields i need using 
 something like {{{ [[Data]fields[]prefix[aaa]] }}} and I can probably sum 
 their values together using the sum[] operator. 

 However, I am stumped as to how I can get the field's value. I know the 
 final filter would look something like {{{ =[[Data]fields[]prefix[aaa]???] 
 +[sum[]] }}} I just do not know what operator to use to get the field 
 values. 



-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c5dead7b-7694-4c8a-97c1-35a2be56bf13n%40googlegroups.com.


[tw5] Re: Selectively summing together field values?

2021-12-16 Thread Dave Kor
Thanks for the info. After looking through my stuff I realized I had 
already solved this several months ago. The solution is rather simple:

{{{ [[Data]fields[]prefix[aaa]] :map[[Data]get] +[sum[]] }}}

On Thursday, December 16, 2021 at 11:43:16 AM UTC+8 cj.v...@gmail.com wrote:

> ARG!  I forgot to mention, that "regexp" bit might need some tweaking so 
> that the pattern gets all, but only, the fields you are interested in.
>
> On Wednesday, December 15, 2021 at 11:41:18 PM UTC-4 Charlie Veniot wrote:
>
>> Hello Dave,
>>
>> That is no trivial thing you're trying to do.  Well, maybe somebody has a 
>> trivial solution.
>>
>> But what a great "Brain Age" game !!!
>>
>> So in the meantime, download the attached and drag into tiddlywiki.com 
>> to import the tiddlers and give you an opportunity to study what I've done.
>>
>> I've pasted the code below as reference for anything murky that needs 
>> some serious explaining.
>>
>> It is not a trivial affair to require dynamic identification of fields 
>> that need to be summed.
>>
>> Much easier to specify the exact fields.  Then you have a simple filter 
>> like "[get[aaa1]] [get[aaa2]] ... etc. ... [get[aaaX]] +[sum[]]"
>>
>> Since we do not know the exact field names, then we have to dynamically 
>> build that filter above.  (As per the *highlighted magic* in the code 
>> below)
>>
>>
>> Ignoring the starting and ending "pre" tags.  I'm trying that to see if 
>> the code below shows up okay in TiddlyTalk (which is finicky with this kind 
>> of stuff.)
>>
>> 
>>
>> \define p1() [get[
>> \define p2() ]]
>> \define p3() +[sum[]]
>>
>> <$list variable="thisField" filter="[fields[]regexp[aaa]]">
>> sum of <> values:
>> <$list filter="[getsum[]]">
>> {{!!title}}
>> 
>> 
>> *<$vars thisDynamicFilter={{{ 
>> [fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>*
>> <$list filter={{{ *[]* }}}>
>> ''total:'' <>
>> 
>> 
>>
>> 
>>
>>
>>
>>
>>
>> On Wednesday, December 15, 2021 at 10:40:06 PM UTC-4 Dave Kor wrote:
>>
>>> Hello,  I am storing numeric data in tiddler fields and I'd like to 
>>> select fields that start with lets say "aaa" and sum all their values 
>>> together. I know I can use filters to select the fields i need using 
>>> something like {{{ [[Data]fields[]prefix[aaa]] }}} and I can probably sum 
>>> their values together using the sum[] operator. 
>>>
>>> However, I am stumped as to how I can get the field's value. I know the 
>>> final filter would look something like {{{ =[[Data]fields[]prefix[aaa]???] 
>>> +[sum[]] }}} I just do not know what operator to use to get the field 
>>> values. 
>>>
>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e08dd3a4-de38-44ea-921c-8100866cb625n%40googlegroups.com.