[tw5] Re: Anyone know how I can expand on filters?

2022-04-11 Thread PMario
There is a typo in the example above: the end-let needs to look like 
``

```
<$let var1=test>

value of var1: <>

outside value of var1: <>   <-- there is no var1 any more ... It's 
gone
```

-m
PS: You should post at talk.tiddlywiki.org ... We can edit posts there, to 
be sure examples work

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/88931dc7-e15f-4a6a-85d5-9ef1aeb6e137n%40googlegroups.com.


[tw5] Re: Anyone know how I can expand on filters?

2022-04-11 Thread PMario
As I wrote in the other post. Wikitext is _no_ general purpose programming 
language. In wikitext variables are only accessible "inside" a widget 
"body". So eg: 

```
<$let var1=test>

value of var1: <>

outside value of var1: <>   <-- there is no var1 any more ... It's 
gone
```

So even if you try to nest the list-widget, it won't work that way, since 
your variables are only useful in the inside of the most inner list. ... 
BUT every "outer" list is still active. 

So if your variable1 has eg: 2 elements _all_ the inner list will be 
evaluated 2 times. ... That's what you see. 

As I also wrote, in the other post. I don't see the whole picture, so I 
could only help with the topic that you described. ... But I kind of knew, 
what could happen. ... 

We can only help, with problems we know, if they are described in plain 
text. If we understand the problem we can probably tell you, how to do it 
the "TiddlyWiki way". ... 

The TW UI is mainly created using lists. They are everywhere. ... But it's 
important to understand that you can't run a list-widget to create several 
variables.  You can use list-widgets to iterate over arrays of titles.

It's like a "map()" function in other languages. 

I don't know, if that helps. ... But without the "big picture" we can't do 
much.

-mario

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fe1961ea-2b10-4f1b-9912-8428a85bdaf5n%40googlegroups.com.


[tw5] Re: Anyone know how I can expand on filters?

2022-04-10 Thread 'Mark S.' via TiddlyWiki
This is a case where it would be helpful to know *why* you're doing what 
you're doing.

You're currently using a prefix of a field to turn into a variable which 
then gets used to find a field value. But you could just extract the field 
directly:

```
{{{ 
[fields[]prefix[myfield]nth[1]]:map[<..currentTiddler>get]
 
}}}
```

Where nth[1] can be incremented for each field value you need.
On Sunday, April 10, 2022 at 6:49:55 PM UTC-7 thyl...@gmail.com wrote:

> The other variables come from other fields. I tried to write something 
> like this:
> ```
> 
>   <$list filter="[fields[]prefix[PREFIX1]]" 
> variable="variable1">
> <$transclude field=<>/>
>   <$list filter="[fields[]prefix[PREFIX2]]" 
> variable="variable2">
> <$transclude field=<>/>
> <$list filter="[fields[]prefix[PREFIX3]]" 
> variable="variable3">
>   <$transclude field=<>/>
>   <$list filter="[fields[]prefix[PREFIX4]]" 
> variable="variable4">
> <$transclude field=<>/> 
>   
>  
>   
> 
>   
> 
> ```
> Variables 2, 3, and 4 are repeated each time the filters are used.
> On Friday, April 8, 2022 at 3:34:47 AM UTC-5 PMario wrote:
>
>> On Thursday, April 7, 2022 at 9:15:16 PM UTC+2 thyl...@gmail.com wrote:
>> ... 
>>
>>> What I really would like to do is something like this:
>>> ```
>>> 
>>>   <$list filter="[fields[]prefix[FIELDNAME]]" 
>>> variable="thisfield">
>>> <$transclude field=<>/>
>>> \variable 2
>>> \variable 3
>>> \variable 4 - also, one of these needs to be a link.
>>>
>>
>> Where should these variables come from? You can use $set, $let widget 
>> outside the UL or $list element  
>> -m
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d1ea86a5-55f8-415d-9d53-8ce5c447fc07n%40googlegroups.com.


[tw5] Re: Anyone know how I can expand on filters?

2022-04-10 Thread Tyler Harris
The other variables come from other fields. I tried to write something like 
this:
```

  <$list filter="[fields[]prefix[PREFIX1]]" 
variable="variable1">
<$transclude field=<>/>
  <$list filter="[fields[]prefix[PREFIX2]]" 
variable="variable2">
<$transclude field=<>/>
<$list filter="[fields[]prefix[PREFIX3]]" 
variable="variable3">
  <$transclude field=<>/>
  <$list filter="[fields[]prefix[PREFIX4]]" 
variable="variable4">
<$transclude field=<>/> 
  
 
  

  

```
Variables 2, 3, and 4 are repeated each time the filters are used.
On Friday, April 8, 2022 at 3:34:47 AM UTC-5 PMario wrote:

> On Thursday, April 7, 2022 at 9:15:16 PM UTC+2 thyl...@gmail.com wrote:
> ... 
>
>> What I really would like to do is something like this:
>> ```
>> 
>>   <$list filter="[fields[]prefix[FIELDNAME]]" 
>> variable="thisfield">
>> <$transclude field=<>/>
>> \variable 2
>> \variable 3
>> \variable 4 - also, one of these needs to be a link.
>>
>
> Where should these variables come from? You can use $set, $let widget 
> outside the UL or $list element  
> -m
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ed4a1217-c12a-40e9-88d7-91389b2738acn%40googlegroups.com.


[tw5] Re: Anyone know how I can expand on filters?

2022-04-08 Thread PMario
On Thursday, April 7, 2022 at 9:15:16 PM UTC+2 thyl...@gmail.com wrote:
... 

> What I really would like to do is something like this:
> ```
> 
>   <$list filter="[fields[]prefix[FIELDNAME]]" 
> variable="thisfield">
> <$transclude field=<>/>
> \variable 2
> \variable 3
> \variable 4 - also, one of these needs to be a link.
>

Where should these variables come from? You can use $set, $let widget 
outside the UL or $list element  
-m

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5a9409f4-2bc7-4a52-922a-f1d0b91c1fe7n%40googlegroups.com.