Better yet : {{||$:/core/ui/TiddlerFields}}
On Monday, 31 January 2022 at 04:03:05 UTC+1 Télumire wrote:
> I think you want to use one of the default templates (or create your own)
> :
>
> {{||$:/core/templates/tiddler-metadata}}
>
> If you still want to use a filter expression you can use this :
>
> {{{[is[current]fields[]!match[text]]:reduce[<..currentTiddler>get<currentTiddler>addprefix[:
>
> ]addprefix<currentTiddler>format:titlelist[]addprefix[
> ]addprefix<accumulator>]+[enlist-input[]]}}}
>
> or using your more elegant method :
>
> {{{
> [is[current]fields[]!match[text]]:map[<..currentTiddler>get<currentTiddler>addprefix[:
>
> ]addprefix<currentTiddler>] }}}
> On Sunday, 30 January 2022 at 20:31:22 UTC+1 CarloGgi wrote:
>
>> thanking again Télumire for his reply, I wonder now how to push things a
>> little further and write a one-liner that outputs *pairs* of values,
>> specifically, for each field of a given tiddler, the couple
>> (field_name,field_value). I'm quite confident that to that aim the named
>> prefix :map is the way to go, and indeed by using it it is easy to have at
>> hand in its filter run both the tiddler's field names and their values.
>> Still I fall short of joining these two data together somehow, so to have
>> (field_name,field_value)
>> as final output of the whole expression.
>>
>> This code:
>>
>> {{{
>> [is[current]fields[]!match[text]]:map[<..currentTiddler>get<currentTiddler>]
>> }}}
>>
>> goes as near as I could go in trying to have the desired output, because
>> it returns the tiddler's fields value; there is a little final step missing
>> to have both the field name and value together...
>>
>> Thanks for any help/suggestion/tip
>>
>> CG
>>
>> On Sunday, January 30, 2022 at 2:40:14 PM UTC+2 CarloGgi wrote:
>>
>>> wow, awesome! Thanks a lot!
>>>
>>> On Sunday, January 30, 2022 at 3:11:49 AM UTC+2 Télumire wrote:
>>>
>>>> {{{
>>>> [is[current]fields[]!match[text]]:reduce[<..currentTiddler>get<currentTiddler>format:titlelist[]addprefix[
>>>>
>>>> ]addprefix<accumulator>]+[enlist-input[]] }}}
>>>>
>>>> On Saturday, 29 January 2022 at 22:12:09 UTC+1 CarloGgi wrote:
>>>>
>>>>> Hallo everyone,
>>>>> how do I write a one-line filter (a single filter expression) that
>>>>> outputs the value of all (or some of) the fields of a given tiddler? The
>>>>> more I try, the less I'm able to...
>>>>>
>>>>> Thanks,
>>>>> CG
>>>>>
>>>>
--
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/81d9add3-06ef-4f12-a226-38e580f53a9bn%40googlegroups.com.