And here's a version that does it by ordinal position:

<$button>alpha mail
<$list filter="[prefix[mytid]]">
  <$action-deletetiddler $tiddler=<<currentTiddler>>/>
</$list>

<$list filter="[range[4]]" variable="nth">
<$list filter="A B C D +[nth<nth>]" variable="v1">
<$list filter="a b c d +[nth<nth>]" variable="v2">
  <$action-createtiddler $basetitle="mytid" v1=<<v1>> v2=<<v2>> />
</$list>
</$list>
</$list>
</$button>

On Saturday, December 26, 2020 at 10:34:42 AM UTC-8 Mark S. wrote:

> This will do what you want in the most literal fashion:
>
> <$button>alpha mail
> <$list filter="[prefix[mytid]]">
>   <$action-deletetiddler $tiddler=<<currentTiddler>>/>
> </$list>
>
> <$list filter="A B C D" variable="v1">
> <$list filter="[<v1>lowercase[]]" variable="v2">
>   <$action-createtiddler $basetitle="mytid" v1=<<v1>> v2=<<v2>> />
> </$list>
> </$list>
> </$button>
>
>
> On Saturday, December 26, 2020 at 8:22:31 AM UTC-8 Erwan wrote:
>
>>
>> Hi everyone,
>>
>> I'm trying to create several tiddlers which contain two fields coming 
>> from two different filters.
>>
>> Example : given the lists "A B C D" and "a b c d" I would like to obtain 
>> 4 tiddlers where each contains the nth value from both lists: 
>>
>> tiddler1 has var1=A var2=a
>> tiddler2 has var1=B var2=b
>> tiddler3 has var1=C var2=c
>> tiddler4 has var1=D var2=d
>>
>> This is my attempt:
>>
>> <$button>
>>
>> create the tiddlers with parallel filters
>>
>> <$list filter="[prefix[mytid]]">
>>   <$action-deletetiddler $tiddler=<<currentTiddler>>/>
>> </$list>
>> <$list filter="A B C D" variable="v1">
>>   <$action-createtiddler $basetitle="mytid" v1=<<v1>> />
>> </$list>
>> <$list filter="a b c d" variable="v2">
>>   <$list filter="[prefix[mytid]!has[v2]]" variable="t">
>>           <$action-setfield $tiddler=<<t>> v2=<<v2>>/>
>>   </$list>
>> </$list>
>> </$button>
>>
>> My great hopes for this solution to work turned out to be misplaced ;)
>>
>> Is there a way to achieve this lind of "parallel matching"?
>>
>> Thanks in advance!
>> Erwan
>>
>>

-- 
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/fb485afc-e5f4-4f0e-b1ca-bb52d77b8dbcn%40googlegroups.com.

Reply via email to