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/a770c263-a37b-4e87-8b33-36efdabb8228n%40googlegroups.com.

Reply via email to