And another correction, in case you have a spaces in tiddler's names: <$button> Uzupełnij tagi kultur <$list filter="[all[tiddlers]tag[+tmp-data-site]]" > <$set name="site_tid" filter="[<currentTiddler>removesuffix[.geojson]]" > <$wikify name="site_tid_w" text=<<site_tid>> > <$action-listops $tiddler=<<site_tid_w>> $field="cultures" $filter="[[]]" /> <$list variable="cult-path" filter="[<currentTiddler>indexes[/features/0/properties/cultures]addprefix[/features/0/properties/cultures/]]" > <$wikify name="cult-path-w" text=<<cult-path>> > <$action-listops $tiddler=<<site_tid_w>> $field="cultures" $subfilter="[<currentTiddler>getindex<cult-path>]" /> </$wikify> </$list> </$wikify> </$set> </$list> </$button>
środa, 30 września 2020 o 19:02:54 UTC+2 Darek Bobak napisał(a): > Ok, I see what was wrong. Each culture was generated in the separate list > cycle and written to the field, overwriting it. > This is corrected, working code: > > <$button> > Uzupełnij tagi kultur > <$list filter="[all[tiddlers]tag[+tmp-data-site]]" > > <$set name="site_tid" filter="[<currentTiddler>removesuffix[.geojson]]" > > <$list variable="cult-path" > filter="[<currentTiddler>indexes[/features/0/properties/cultures]addprefix[/features/0/properties/cultures/]]" > > > > <$wikify name="cult-path-w" text=<<cult-path>> > > <$action-listops $tiddler=<<site_tid>> $field="cultures" > $subfilter="[<currentTiddler>getindex<cult-path>]" /> > </$wikify> > </$list> > </$set> > </$list> > </$button> > > środa, 30 września 2020 o 13:17:07 UTC+2 Darek Bobak napisał(a): > >> Why it doesn't work? >> >> I'd like to: >> 1. Get the value from the multivalue json property (culture in this case) >> 2. Assign all of the values to the field "cultures" of other tiddler >> >> The value (marked red below) is displayed properly, but only the lat >> value is assigned to field. I'm attaching sample json file, from which I >> try to get the data. >> >> \define totext() <$text text="""$(cult_field_val)$"""/> >> >> <$button> >> Fill the cultures field >> <$list filter="[all[tiddlers]tag[+tmp-data-site]]" > >> >> <$set name="site_tid" filter="[<currentTiddler>removesuffix[.geojson]]" > >> <$set name="cult_field_cur" value=<<cult_field_val>> emptyValue=""> >> >> <$list variable="cult-path" >> filter="[<currentTiddler>indexes[/features/0/properties/cultures]addprefix[/features/0/properties/cultures/]]" >> > >> <$wikify name="cult-path-w" text=<<cult-path>> > >> >> <$set name="cult_field_val" >> filter="[<currentTiddler>getindex<cult-path>addprefix<cult_field_cur>]" > >> <$set name="cult_list" value=<<totext>> > >> <$wikify name="cult_list_w" text=<<cult_list>> > >> <<cult_list_w>> >> >> <$action-setfield $tiddler=<<site_tid>> $field="cultures" >> $value=<<cult_list_w>> /> >> </$wikify> >> </$set> >> </$set> >> </$wikify> >> </$list> >> </$set> >> </$set> >> </$list> >> </$button> >> >> cheers, >> Darek >> >> >> -- 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/265ab0e8-e8e3-42cf-b79b-a4d69818ac28n%40googlegroups.com.

