Hi Mark,

thanks for that one! I consider splitting it to more "tiddler-style" soon.

Best wishes,
Mirko

Am Samstag, 31. August 2019 21:07:50 UTC+2 schrieb Mark S.:
>
> Returns count for all fields that start with "stuf" and contain string 
> "wrong".
>
> The complexity of this answer suggests that you might want to restructure 
> your project/questions, so that each response goes into
> its own tiddler. Then getting the count (and other data analyses) will be 
> much more straightforward.
>
> \define mywrongs() 
> <$vars mytid="""$(mytid)$"""><$list filter=
> "[<mytid>fields[]regexp[^stuf]]" variable="field"><$list filter=
> "[<mytid>get<field>regexp[wrong]]"><<field>>
> </$list></$list></$vars>
> \end
> \define wrongsintiddler(mytid)
> <$vars mytid="""$mytid$""">
> <$wikify text=<<mywrongs>> name="wrongs">
> {{{ [enlist<wrongs>count[]] }}}
> </$wikify>
> </$vars>
> \end
>
> <<wrongsintiddler "regexp Operator">>
>
>
>
> On Friday, August 30, 2019 at 2:03:32 AM UTC-7, Mirko Richter wrote:
>>
>> Hi,
>>
>> is it possible to* count all fields* within some *single specific 
>> tiddler* that have *a certain value*? If yes, how ;)? Im currently 
>> struggling on that and don't know how to go on...
>>
>> (My use case: a filled-out questionnaire with the text "wrong" or 
>> "correct" (i already calculate it while stepping the wizzard) in an 
>> arbitrary number of fields. The field's name is the name of the underlying 
>> question. I just want to know how many "wrong"s or "correct"s are in there.)
>>
>> *Additional question:* Can i also restricted the fields under 
>> consideration in terms of regexp[], suffix[], prefix[] or other 
>> string-based criteria?
>>
>> Thanks,
>> Mirko
>>
>

-- 
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/b45e173f-323d-4b3a-80bd-5832116d8b80%40googlegroups.com.

Reply via email to