At this point it is more complicated, and we need to consider the structure 
of the data. Will the field
literally contain "Toyota *and* BMW.", in which case the car with the 
highest count will probably
be the "and" car. Or will it be a list field of some type? Or will we know 
the names of car makes in 
advance?

On Tuesday, October 22, 2019 at 8:21:33 AM UTC-7, Mohammad wrote:
>
> Hi Mark,
>  Thanks it works!
> I assume the input is all[tiddlers+shadows].
>
> One more question if in a field there is *Toyota and BMW*
> Then how modify the above code to cover such a case?
>
> --Mohammad
>
> On Tuesday, October 22, 2019 at 6:17:51 PM UTC+3:30, Mark S. wrote:
>>
>> <$list filter="[each[car]get[car]]">
>> <<currentTiddler>>: <$count filter="[car<currentTiddler>]"/><br/>
>> </$list>
>>
>> On Tuesday, October 22, 2019 at 4:51:08 AM UTC-7, Mohammad wrote:
>>>
>>> This may be a repeated question
>>>
>>> Assume you have few tiddlers some have  field called *car*
>>>
>>> Then you want to count how many cars of each makers is referenced
>>>
>>> Example
>>>  Tid01
>>>    car: Toyota
>>>  Tid02
>>>    car: Fiat
>>>  Tid03
>>>    car: BMW
>>>  Tid04
>>>    car: Toyota
>>>  Tid05
>>>    car: BMW
>>>  Tid06
>>>    car: Ford
>>>  Tid07
>>>    car: Toyota
>>>  Tid08
>>>    car: BMW
>>>  Tid09
>>>    car: Ford
>>>  Tid10
>>>    car: Toyota
>>>
>>> Answer should be
>>> BMW: 3
>>> Fiat: 1
>>> Ford: 2
>>> Toyota: 4
>>>
>>>
>>>

-- 
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/99b0db27-1b16-48a2-8801-7a3aa3147644%40googlegroups.com.

Reply via email to