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={{{
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">
<>
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
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,
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:
>
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*
>
6 matches
Mail list logo