[tw5] Re: Please, help to write filter a1 a2 a3 ...+b1 b2 b3 ...= a1 b1 +a2 b2 + a3 b3 +...

2020-12-06 Thread Eric Shulman
Here's another approach that uses recursion: \define merge(list1,list2) <$list filter="[[$list1$]!match[]then[$list2$]!match[]]"> <$text text={{{ [enlist:raw[$list1$]first[]] }}}/> - <$text text={{{ [enlist:raw[$list2$]first[]] }}}/> <$macrocall $name="merge" list1={{{

[tw5] Re: Please, help to write filter a1 a2 a3 ...+b1 b2 b3 ...= a1 b1 +a2 b2 + a3 b3 +...

2020-12-06 Thread Siniy-Kit
Thank you, Mark! I didn't know about range! <$set name="end" value={{{[enlist:raw{!!select-color}count[]]}}}> <$list filter="[range]" variable="index"> <$list filter="[enlist:raw{!!select-color}nth]" variable="color"> <$list filter="[enlist:raw{!!price-select-color}nth]" variable="price"> <>

[tw5] Re: Please, help to write filter a1 a2 a3 ...+b1 b2 b3 ...= a1 b1 +a2 b2 + a3 b3 +...

2020-12-06 Thread 'Mark S.' via TiddlyWiki
Version where you don't have to specify range by hand \define color-price(end) <$list filter="[range[1,$end$]]" variable="index"> <$list filter="[enlist:raw{!!select-color}nth]" variable="color"> <$list filter="[enlist:raw{!!price-select-color}nth]" variable="price"> <> - <> \end <$list

[tw5] Re: Please, help to write filter a1 a2 a3 ...+b1 b2 b3 ...= a1 b1 +a2 b2 + a3 b3 +...

2020-12-06 Thread 'Mark S.' via TiddlyWiki
Something like this, maybe: <$list filter="[range[1,4]]" variable="index"> <$list filter="[enlist:raw{!!select-color}nth]" variable="color"> <$list filter="[enlist:raw{!!price-select-color}nth]" variable="price"> <> - <> On Sunday, December 6, 2020 at 2:53:52 AM UTC-8 Siniy-Kit wrote: > Hi,

[tw5] Re: Please, help to write filter a1 a2 a3 ...+b1 b2 b3 ...= a1 b1 +a2 b2 + a3 b3 +...

2020-12-06 Thread Siniy-Kit
Hi, Mohammad. Unfortunately I cant usedictionary variant. my idea was to combine lists select-color + price-select-color order[reverse] and then cut one by one first - last but hope, somebody knows another way воскресенье, 6 декабря 2020 г. в 14:20:22 UTC+3, Mohammad: >

[tw5] Re: Please, help to write filter a1 a2 a3 ...+b1 b2 b3 ...= a1 b1 +a2 b2 + a3 b3 +...

2020-12-06 Thread Mohammad
Siniy-kit, Are you allowed to use a data dictionary and hard code values like this red: 100 green: 200 blue: 30 If so just search in a data dictionary. On Sunday, December 6, 2020 at 2:23:52 PM UTC+3:30 Siniy-Kit wrote: > Hi, i have two fields in my tiddler > *select-color: red green blue* >