[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-17 Thread OGNSYA
Thanks @saq 

I just realized we sent almost the same thing at the same time :)


On Wednesday, June 17, 2020 at 12:40:32 PM UTC+1, Saq Imtiaz wrote:
>
> If importance is in the range 0-10 and whole numbers only, the following 
> will do what you want though it is not very elegant:
>
> [importance[5]] [importance[6]] [importance[7]] [importance[8]] 
> [importance[9]] [importance[10]]
>
> On Wednesday, June 17, 2020 at 1:11:20 PM UTC+2, Saq Imtiaz wrote:
>>
>> This is usually done with nested lists.
>>
>> What is the numerical range for importance? With a limited set of values 
>> there are other ways to approach this
>>
>> Is it 0-10 and whole numbers only?
>>
>>

-- 
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/42bfda3d-e26c-48f0-9a68-d71ab0640d79o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-17 Thread OGNSYA
The range is quite limited indeed (0-10, whole), so adding this to my 
filter works:
+[importance[5]] [importance[6]] [importance[7]] [importance[8]] [importance
[9]] [importance[10]]

It just feels very messy. Also, I'll probably want to do more complex 
comparisons in the future...

On Wednesday, June 17, 2020 at 12:11:20 PM UTC+1, Saq Imtiaz wrote:
>
> This is usually done with nested lists.
>
> What is the numerical range for importance? With a limited set of values 
> there are other ways to approach this
>
> Is it 0-10 and whole numbers only?
>
>

-- 
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/63139ec6-e60f-42ae-99dd-6d86a4530367o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-17 Thread Saq Imtiaz
If importance is in the range 0-10 and whole numbers only, the following 
will do what you want though it is not very elegant:

[importance[5]] [importance[6]] [importance[7]] [importance[8]] 
[importance[9]] [importance[10]]

On Wednesday, June 17, 2020 at 1:11:20 PM UTC+2, Saq Imtiaz wrote:
>
> This is usually done with nested lists.
>
> What is the numerical range for importance? With a limited set of values 
> there are other ways to approach this
>
> Is it 0-10 and whole numbers only?
>
>

-- 
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/3a74b106-e221-4f65-9ff5-130b6cfe30d3o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-17 Thread Saq Imtiaz
This is usually done with nested lists.

What is the numerical range for importance? With a limited set of values there 
are other ways to approach this

Is it 0-10 and whole numbers only?

-- 
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/e76eefd2-ff22-458a-834d-61849f1c5ea0o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-17 Thread OGNSYA
Funny thing is that in the process of figuring that out I managed to 
implement by myself a cool real-time filter for my table.
I thought this would take ages to do.

Meanwhile, I can't figure out how to implement this thing I thought would 
be very simple (have a filter that outputs only tiddlers where a field is 
within a certain numerical range).

On Tuesday, June 16, 2020 at 4:47:58 PM UTC+1, OGNSYA wrote:
>
> That works, thanks!
>
> Could it be all done within the filter?
> I want to use it as a filter for a TiddlyTables table. I think I can only 
> configure a filter there. (see image attached)
>
> Thanks for explaining things to me. I did read Eric's email. But I'm a 
> beginner in TW , and not a strong coder (I can do very simple JS/HTML), so 
> the language is still quite overwhelming to me.
>
>
> On Tuesday, June 16, 2020 at 4:06:04 PM UTC+1, Saq Imtiaz wrote:
>>
>> <$list filter="[has[importance]]">
>>
>> {{{ [{!!importance}compare:number:gteq[5]then{!!title}] }}}
>>
>> 
>>
>> I also recommend you re-read what Eric has explained above regarding 
>> brackets in filters.
>>
>> On Tuesday, June 16, 2020 at 4:41:26 PM UTC+2, OGNSYA wrote:
>>>
>>> Thanks Saq.
>>>
>>> I tried your suggestion and it did the filtering, however the output 
>>> doesn't seem to be the actual tiddler list.
>>>
>>> First, here's a simpler example that works for me:
>>> <$list filter="[importance[5]]"><$view field="title"/>
>>>
>>> This correctly outputs a list of all tiddlers with *importance* field 
>>> equal to 5.
>>> Tiddler A
>>> Tiddler B
>>> Tiddler D
>>> Tiddler G
>>> etc.
>>>
>>> Below, my attempt to show all tiddlers with *importance* equal or 
>>> greater than 5, based on the code you suggested:
>>> <$list filter="[get[importance]compare:number:gteq[5]]"><$view 
>>> field="title"/>
>>>
>>> This returns a list of numbers, corresponding to the importance field, 
>>> for each tiddler.
>>> 8
>>> 10
>>> 6
>>> 5
>>> 8
>>> (etc...)
>>>
>>> That is actually correct, considering it's only showing numbers 5 and 
>>> above. However I'd like the output to be the tiddlers themselves (as in my 
>>> simple example).
>>> I'm probably doing something wrong. I just don't know what..
>>>
>>> I also tried this:
>>> <$list 
>>> filter="[importance[[get[importance]compare:number:gteq[5"><$view 
>>> field="title"/>
>>>
>>> But it returns:
>>> Filter error: Syntax error in filter expression
>>>
>>>
>>>
>>> On Tuesday, June 16, 2020 at 2:40:53 PM UTC+1, Saq Imtiaz wrote:

 try [get[importance]compare:number:gteq[5]]

 this assumes you want to compare a field with name importance

 On Tuesday, June 16, 2020 at 1:07:28 PM UTC+2, OGNSYA wrote:
>
> Thanks for that Eric. 
> For some reason it didn't work for me...
>
> This simple case works, for showing all tiddlers with importance set 
> as 5:
> (note I changed the field name from *priority* to *importance*)
> [importance[5]]
>
> I tried this, for showing all tiddlers with importance 5 or higher: 
> [importance[{!!importance}compare:number:gteq[5]]]
>
> I also tried just this:
> [{!!importance}compare:number:gteq[5]]
>
>
> On Tuesday, June 16, 2020 at 11:33:20 AM UTC+1, Eric Shulman wrote:
>>
>> On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:
>>>
>>> Thanks! I did see that, but couldn't figure out how to actually use 
>>> it.
>>> Let's say I want to filter only tiddlers where the custom field 
>>> *priority* is 5 or greater.
>>>
>>
>> Give this a try: 
>> [{!!priority}compare:number:gteq[5]]
>>
>> Note that, in filter syntax, you use *single* brackets around 
>> references,
>> and except for the outermost square brackets around the whole filter 
>> run,
>> the brackets are part of the reference itself, where
>> *[...] is for literal values, {...} is for field values, and <...> is 
>> for variables*
>>
>> So, for example, in addition to the above syntax for comparing with a 
>> literal value of "5",
>> you could compare with a value stored in another field:
>> [{!!priority}compare:number:gteq{!!minimum}]
>> or with a value from a variable:
>> <$vars minimum="5">
>> [{!!priority}compare:number:gteq]
>> 
>>
>> hope this helps,
>>
>> enjoy,
>> -e
>>
>

-- 
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/6f73a480-72ef-40e8-8ac5-1e52046bbdc6o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread OGNSYA
That works, thanks!

Could it be all done within the filter?
I want to use it as a filter for a TiddlyTables table. I think I can only 
configure a filter there. (see image attached)

Thanks for explaining things to me. I did read Eric's email. But I'm a 
beginner in TW , and not a strong coder (I can do very simple JS/HTML), so 
the language is still quite overwhelming to me.


On Tuesday, June 16, 2020 at 4:06:04 PM UTC+1, Saq Imtiaz wrote:
>
> <$list filter="[has[importance]]">
>
> {{{ [{!!importance}compare:number:gteq[5]then{!!title}] }}}
>
> 
>
> I also recommend you re-read what Eric has explained above regarding 
> brackets in filters.
>
> On Tuesday, June 16, 2020 at 4:41:26 PM UTC+2, OGNSYA wrote:
>>
>> Thanks Saq.
>>
>> I tried your suggestion and it did the filtering, however the output 
>> doesn't seem to be the actual tiddler list.
>>
>> First, here's a simpler example that works for me:
>> <$list filter="[importance[5]]"><$view field="title"/>
>>
>> This correctly outputs a list of all tiddlers with *importance* field 
>> equal to 5.
>> Tiddler A
>> Tiddler B
>> Tiddler D
>> Tiddler G
>> etc.
>>
>> Below, my attempt to show all tiddlers with *importance* equal or 
>> greater than 5, based on the code you suggested:
>> <$list filter="[get[importance]compare:number:gteq[5]]"><$view 
>> field="title"/>
>>
>> This returns a list of numbers, corresponding to the importance field, 
>> for each tiddler.
>> 8
>> 10
>> 6
>> 5
>> 8
>> (etc...)
>>
>> That is actually correct, considering it's only showing numbers 5 and 
>> above. However I'd like the output to be the tiddlers themselves (as in my 
>> simple example).
>> I'm probably doing something wrong. I just don't know what..
>>
>> I also tried this:
>> <$list 
>> filter="[importance[[get[importance]compare:number:gteq[5"><$view 
>> field="title"/>
>>
>> But it returns:
>> Filter error: Syntax error in filter expression
>>
>>
>>
>> On Tuesday, June 16, 2020 at 2:40:53 PM UTC+1, Saq Imtiaz wrote:
>>>
>>> try [get[importance]compare:number:gteq[5]]
>>>
>>> this assumes you want to compare a field with name importance
>>>
>>> On Tuesday, June 16, 2020 at 1:07:28 PM UTC+2, OGNSYA wrote:

 Thanks for that Eric. 
 For some reason it didn't work for me...

 This simple case works, for showing all tiddlers with importance set as 
 5:
 (note I changed the field name from *priority* to *importance*)
 [importance[5]]

 I tried this, for showing all tiddlers with importance 5 or higher: 
 [importance[{!!importance}compare:number:gteq[5]]]

 I also tried just this:
 [{!!importance}compare:number:gteq[5]]


 On Tuesday, June 16, 2020 at 11:33:20 AM UTC+1, Eric Shulman wrote:
>
> On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:
>>
>> Thanks! I did see that, but couldn't figure out how to actually use 
>> it.
>> Let's say I want to filter only tiddlers where the custom field 
>> *priority* is 5 or greater.
>>
>
> Give this a try: 
> [{!!priority}compare:number:gteq[5]]
>
> Note that, in filter syntax, you use *single* brackets around 
> references,
> and except for the outermost square brackets around the whole filter 
> run,
> the brackets are part of the reference itself, where
> *[...] is for literal values, {...} is for field values, and <...> is 
> for variables*
>
> So, for example, in addition to the above syntax for comparing with a 
> literal value of "5",
> you could compare with a value stored in another field:
> [{!!priority}compare:number:gteq{!!minimum}]
> or with a value from a variable:
> <$vars minimum="5">
> [{!!priority}compare:number:gteq]
> 
>
> hope this helps,
>
> enjoy,
> -e
>


-- 
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/2a027b38-2005-4281-a2cc-ce86347a2d67o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread Saq Imtiaz
<$list filter="[has[importance]]">

{{{ [{!!importance}compare:number:gteq[5]then{!!title}] }}}



I also recommend you re-read what Eric has explained above regarding 
brackets in filters.

On Tuesday, June 16, 2020 at 4:41:26 PM UTC+2, OGNSYA wrote:
>
> Thanks Saq.
>
> I tried your suggestion and it did the filtering, however the output 
> doesn't seem to be the actual tiddler list.
>
> First, here's a simpler example that works for me:
> <$list filter="[importance[5]]"><$view field="title"/>
>
> This correctly outputs a list of all tiddlers with *importance* field 
> equal to 5.
> Tiddler A
> Tiddler B
> Tiddler D
> Tiddler G
> etc.
>
> Below, my attempt to show all tiddlers with *importance* equal or greater 
> than 5, based on the code you suggested:
> <$list filter="[get[importance]compare:number:gteq[5]]"><$view 
> field="title"/>
>
> This returns a list of numbers, corresponding to the importance field, for 
> each tiddler.
> 8
> 10
> 6
> 5
> 8
> (etc...)
>
> That is actually correct, considering it's only showing numbers 5 and 
> above. However I'd like the output to be the tiddlers themselves (as in my 
> simple example).
> I'm probably doing something wrong. I just don't know what..
>
> I also tried this:
> <$list 
> filter="[importance[[get[importance]compare:number:gteq[5"><$view 
> field="title"/>
>
> But it returns:
> Filter error: Syntax error in filter expression
>
>
>
> On Tuesday, June 16, 2020 at 2:40:53 PM UTC+1, Saq Imtiaz wrote:
>>
>> try [get[importance]compare:number:gteq[5]]
>>
>> this assumes you want to compare a field with name importance
>>
>> On Tuesday, June 16, 2020 at 1:07:28 PM UTC+2, OGNSYA wrote:
>>>
>>> Thanks for that Eric. 
>>> For some reason it didn't work for me...
>>>
>>> This simple case works, for showing all tiddlers with importance set as 
>>> 5:
>>> (note I changed the field name from *priority* to *importance*)
>>> [importance[5]]
>>>
>>> I tried this, for showing all tiddlers with importance 5 or higher: 
>>> [importance[{!!importance}compare:number:gteq[5]]]
>>>
>>> I also tried just this:
>>> [{!!importance}compare:number:gteq[5]]
>>>
>>>
>>> On Tuesday, June 16, 2020 at 11:33:20 AM UTC+1, Eric Shulman wrote:

 On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:
>
> Thanks! I did see that, but couldn't figure out how to actually use it.
> Let's say I want to filter only tiddlers where the custom field 
> *priority* is 5 or greater.
>

 Give this a try: 
 [{!!priority}compare:number:gteq[5]]

 Note that, in filter syntax, you use *single* brackets around 
 references,
 and except for the outermost square brackets around the whole filter 
 run,
 the brackets are part of the reference itself, where
 *[...] is for literal values, {...} is for field values, and <...> is 
 for variables*

 So, for example, in addition to the above syntax for comparing with a 
 literal value of "5",
 you could compare with a value stored in another field:
 [{!!priority}compare:number:gteq{!!minimum}]
 or with a value from a variable:
 <$vars minimum="5">
 [{!!priority}compare:number:gteq]
 

 hope this helps,

 enjoy,
 -e

>>>

-- 
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/adb00846-9e68-46a0-b999-9c5b6ad4918co%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread OGNSYA
Thanks Saq.

I tried your suggestion and it did the filtering, however the output 
doesn't seem to be the actual tiddler list.

First, here's a simpler example that works for me:
<$list filter="[importance[5]]"><$view field="title"/>

This correctly outputs a list of all tiddlers with *importance* field equal 
to 5.
Tiddler A
Tiddler B
Tiddler D
Tiddler G
etc.

Below, my attempt to show all tiddlers with *importance* equal or greater 
than 5, based on the code you suggested:
<$list filter="[get[importance]compare:number:gteq[5]]"><$view 
field="title"/>

This returns a list of numbers, corresponding to the importance field, for 
each tiddler.
8
10
6
5
8
(etc...)

That is actually correct, considering it's only showing numbers 5 and 
above. However I'd like the output to be the tiddlers themselves (as in my 
simple example).
I'm probably doing something wrong. I just don't know what..

I also tried this:
<$list 
filter="[importance[[get[importance]compare:number:gteq[5"><$view 
field="title"/>

But it returns:
Filter error: Syntax error in filter expression



On Tuesday, June 16, 2020 at 2:40:53 PM UTC+1, Saq Imtiaz wrote:
>
> try [get[importance]compare:number:gteq[5]]
>
> this assumes you want to compare a field with name importance
>
> On Tuesday, June 16, 2020 at 1:07:28 PM UTC+2, OGNSYA wrote:
>>
>> Thanks for that Eric. 
>> For some reason it didn't work for me...
>>
>> This simple case works, for showing all tiddlers with importance set as 5:
>> (note I changed the field name from *priority* to *importance*)
>> [importance[5]]
>>
>> I tried this, for showing all tiddlers with importance 5 or higher: 
>> [importance[{!!importance}compare:number:gteq[5]]]
>>
>> I also tried just this:
>> [{!!importance}compare:number:gteq[5]]
>>
>>
>> On Tuesday, June 16, 2020 at 11:33:20 AM UTC+1, Eric Shulman wrote:
>>>
>>> On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:

 Thanks! I did see that, but couldn't figure out how to actually use it.
 Let's say I want to filter only tiddlers where the custom field 
 *priority* is 5 or greater.

>>>
>>> Give this a try: 
>>> [{!!priority}compare:number:gteq[5]]
>>>
>>> Note that, in filter syntax, you use *single* brackets around references,
>>> and except for the outermost square brackets around the whole filter run,
>>> the brackets are part of the reference itself, where
>>> *[...] is for literal values, {...} is for field values, and <...> is 
>>> for variables*
>>>
>>> So, for example, in addition to the above syntax for comparing with a 
>>> literal value of "5",
>>> you could compare with a value stored in another field:
>>> [{!!priority}compare:number:gteq{!!minimum}]
>>> or with a value from a variable:
>>> <$vars minimum="5">
>>> [{!!priority}compare:number:gteq]
>>> 
>>>
>>> hope this helps,
>>>
>>> enjoy,
>>> -e
>>>
>>

-- 
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/33d1932a-cd4f-4fc3-a6eb-3bbd000fef26o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread Saq Imtiaz
try [get[importance]compare:number:gteq[5]]

this assumes you want to compare a field with name importance

On Tuesday, June 16, 2020 at 1:07:28 PM UTC+2, OGNSYA wrote:
>
> Thanks for that Eric. 
> For some reason it didn't work for me...
>
> This simple case works, for showing all tiddlers with importance set as 5:
> (note I changed the field name from *priority* to *importance*)
> [importance[5]]
>
> I tried this, for showing all tiddlers with importance 5 or higher: 
> [importance[{!!importance}compare:number:gteq[5]]]
>
> I also tried just this:
> [{!!importance}compare:number:gteq[5]]
>
>
> On Tuesday, June 16, 2020 at 11:33:20 AM UTC+1, Eric Shulman wrote:
>>
>> On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:
>>>
>>> Thanks! I did see that, but couldn't figure out how to actually use it.
>>> Let's say I want to filter only tiddlers where the custom field 
>>> *priority* is 5 or greater.
>>>
>>
>> Give this a try: 
>> [{!!priority}compare:number:gteq[5]]
>>
>> Note that, in filter syntax, you use *single* brackets around references,
>> and except for the outermost square brackets around the whole filter run,
>> the brackets are part of the reference itself, where
>> *[...] is for literal values, {...} is for field values, and <...> is for 
>> variables*
>>
>> So, for example, in addition to the above syntax for comparing with a 
>> literal value of "5",
>> you could compare with a value stored in another field:
>> [{!!priority}compare:number:gteq{!!minimum}]
>> or with a value from a variable:
>> <$vars minimum="5">
>> [{!!priority}compare:number:gteq]
>> 
>>
>> hope this helps,
>>
>> enjoy,
>> -e
>>
>

-- 
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/6dfdc0a1-9949-4de1-892d-dc8c628a34f8o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread OGNSYA
Thanks for that Eric. 
For some reason it didn't work for me...

This simple case works, for showing all tiddlers with importance set as 5:
[importance[5]]

I tried this, for showing all tiddlers with importance 5 or higher: 
(note I changed the field name from *priority* to *importance*)
[importance[{!!importance}compare:number:gteq[5]]]

I also tried just this:
[{!!importance}compare:number:gteq[5]]


On Tuesday, June 16, 2020 at 11:33:20 AM UTC+1, Eric Shulman wrote:
>
> On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:
>>
>> Thanks! I did see that, but couldn't figure out how to actually use it.
>> Let's say I want to filter only tiddlers where the custom field 
>> *priority* is 5 or greater.
>>
>
> Give this a try: 
> [{!!priority}compare:number:gteq[5]]
>
> Note that, in filter syntax, you use *single* brackets around references,
> and except for the outermost square brackets around the whole filter run,
> the brackets are part of the reference itself, where
> *[...] is for literal values, {...} is for field values, and <...> is for 
> variables*
>
> So, for example, in addition to the above syntax for comparing with a 
> literal value of "5",
> you could compare with a value stored in another field:
> [{!!priority}compare:number:gteq{!!minimum}]
> or with a value from a variable:
> <$vars minimum="5">
> [{!!priority}compare:number:gteq]
> 
>
> hope this helps,
>
> enjoy,
> -e
>

-- 
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/35c60b8a-7ec0-45c6-8262-54cc15ec2522o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread Eric Shulman
On Tuesday, June 16, 2020 at 3:04:46 AM UTC-7, OGNSYA wrote:
>
> Thanks! I did see that, but couldn't figure out how to actually use it.
> Let's say I want to filter only tiddlers where the custom field *priority* 
> is 5 or greater.
>

Give this a try: 
[{!!priority}compare:number:gteq[5]]

Note that, in filter syntax, you use *single* brackets around references,
and except for the outermost square brackets around the whole filter run,
the brackets are part of the reference itself, where
*[...] is for literal values, {...} is for field values, and <...> is for 
variables*

So, for example, in addition to the above syntax for comparing with a 
literal value of "5",
you could compare with a value stored in another field:
[{!!priority}compare:number:gteq{!!minimum}]
or with a value from a variable:
<$vars minimum="5">
[{!!priority}compare:number:gteq]


hope this helps,

enjoy,
-e

-- 
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/1ccf5d04-f167-43b0-832c-d0d9f19569d8o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-16 Thread OGNSYA
Thanks! I did see that, but couldn't figure out how to actually use it.
Let's say I want to filter only tiddlers where the custom field *priority* 
is 5 or greater.

This works, but it's messy: 
[priority[5]] [priority[6]] [priority[7]] [priority[8]] [priority[9]] [
priority[10]] +[!is[system]tag[My Tag]]

I understand that this, for example, returns 6, because 6 is greater than 
or equal to 5:
[[6]compare:number:gteq[5]]

However, I don't know how to use that in a filter 
As far as I understand, that first parameter should be a list of 
tiddlers... But then I'd be comparing the tiddler, not a specific field 
within it...
Which means I'd need to first test using only the value of that field, and 
then use that to filter.
I tried these, but none worked...

priority[[{{!!priority}}]compare:number:gteq[5]]
priority[[[{{!!priority}}]compare:number:gteq[5]]]
priority[[[field:priority]compare:number:gteq[5]]]

I figure there is probably a very simple solution to this that I'm missing.

On Tuesday, June 16, 2020 at 12:09:29 AM UTC+1, Mark S. wrote:
>
>
> The "compare" operator can let you make numeric comparisons:
>
> https://tiddlywiki.com/#compare%20Operator
>
>
> On Monday, June 15, 2020 at 3:29:01 PM UTC-7, OGNSYA wrote:
>>
>> Perfect! Thank you.
>>
>> I did have the tiddler name as [[My Status]] in the custom field.
>> I was assuming that the tag field of a tiddler was simply a list of 
>> titles.
>> Since my custom field was also a list of titles, I assumed I could access 
>> it the same way.
>> I suppose it's not...
>>
>> Now I'm stuck trying to filter based on a number in a custom field called 
>> "priority".
>> I'd like to only show tiddlers with priority equal or greater than "5"
>> Can I do that in a filter?
>>
>> On Monday, June 15, 2020 at 11:09:01 PM UTC+1, Mark S. wrote:
>>>
>>> If "status" is a list of tiddler names, then any of the names in the 
>>> list that have spaces need to be like [[My Status]]. This is called a title 
>>> list. And you can't search directly with status[], because that method 
>>> only matches fields with a single value. Instead use the "contains" 
>>> operator, with the field status as a suffix. Like:
>>>
>>> [!is[system]tag[My Tag]contains:status[My Status]]
>>>
>>> HTH
>>>
>>> On Monday, June 15, 2020 at 2:39:33 PM UTC-7, OGNSYA wrote:

 I'm trying to filter a list by my own custom field "Status", which is a 
 list of tiddler names, but it only works if the value has no space in it.

 Here's my code (the tag part works fine):

 [!is[system]tag[My Tag]status[My Status]]

 If I remove the space from the "My Status" tiddler, and change the 
 above to "MyStatus", it works.

 What am I doing wrong? 
 Shouldn't this work the same as with tags?

 Thanks!

>>>

-- 
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/8cf2ca0c-b150-42ac-ae6a-23f6fc554f5eo%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-15 Thread 'Mark S.' via TiddlyWiki

The "compare" operator can let you make numeric comparisons:

https://tiddlywiki.com/#compare%20Operator


On Monday, June 15, 2020 at 3:29:01 PM UTC-7, OGNSYA wrote:
>
> Perfect! Thank you.
>
> I did have the tiddler name as [[My Status]] in the custom field.
> I was assuming that the tag field of a tiddler was simply a list of titles.
> Since my custom field was also a list of titles, I assumed I could access 
> it the same way.
> I suppose it's not...
>
> Now I'm stuck trying to filter based on a number in a custom field called 
> "priority".
> I'd like to only show tiddlers with priority equal or greater than "5"
> Can I do that in a filter?
>
> On Monday, June 15, 2020 at 11:09:01 PM UTC+1, Mark S. wrote:
>>
>> If "status" is a list of tiddler names, then any of the names in the list 
>> that have spaces need to be like [[My Status]]. This is called a title 
>> list. And you can't search directly with status[], because that method 
>> only matches fields with a single value. Instead use the "contains" 
>> operator, with the field status as a suffix. Like:
>>
>> [!is[system]tag[My Tag]contains:status[My Status]]
>>
>> HTH
>>
>> On Monday, June 15, 2020 at 2:39:33 PM UTC-7, OGNSYA wrote:
>>>
>>> I'm trying to filter a list by my own custom field "Status", which is a 
>>> list of tiddler names, but it only works if the value has no space in it.
>>>
>>> Here's my code (the tag part works fine):
>>>
>>> [!is[system]tag[My Tag]status[My Status]]
>>>
>>> If I remove the space from the "My Status" tiddler, and change the above 
>>> to "MyStatus", it works.
>>>
>>> What am I doing wrong? 
>>> Shouldn't this work the same as with tags?
>>>
>>> Thanks!
>>>
>>

-- 
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/2a1e25ee-5388-4b79-9a45-1142631a0e37o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-15 Thread OGNSYA
Perfect! Thank you.

I did have the tiddler name as [[My Status]] in the custom field.
I was assuming that the tag field of a tiddler was simply a list of titles.
Since my custom field was also a list of titles, I assumed I could access 
it the same way.
I suppose it's not...

Now I'm stuck trying to filter based on a number in a custom field called 
"priority".
I'd like to only show tiddlers with priority equal or greater than "5"
Can I do that in a filter?

On Monday, June 15, 2020 at 11:09:01 PM UTC+1, Mark S. wrote:
>
> If "status" is a list of tiddler names, then any of the names in the list 
> that have spaces need to be like [[My Status]]. This is called a title 
> list. And you can't search directly with status[], because that method 
> only matches fields with a single value. Instead use the "contains" 
> operator, with the field status as a suffix. Like:
>
> [!is[system]tag[My Tag]contains:status[My Status]]
>
> HTH
>
> On Monday, June 15, 2020 at 2:39:33 PM UTC-7, OGNSYA wrote:
>>
>> I'm trying to filter a list by my own custom field "Status", which is a 
>> list of tiddler names, but it only works if the value has no space in it.
>>
>> Here's my code (the tag part works fine):
>>
>> [!is[system]tag[My Tag]status[My Status]]
>>
>> If I remove the space from the "My Status" tiddler, and change the above 
>> to "MyStatus", it works.
>>
>> What am I doing wrong? 
>> Shouldn't this work the same as with tags?
>>
>> Thanks!
>>
>

-- 
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/bf61ba82-8ae7-4538-b178-7d420a017337o%40googlegroups.com.


[tw5] Re: Filter by Custom Field containing Tiddler name with spaces in it?

2020-06-15 Thread 'Mark S.' via TiddlyWiki
If "status" is a list of tiddler names, then any of the names in the list 
that have spaces need to be like [[My Status]]. This is called a title 
list. And you can't search directly with status[], because that method 
only matches fields with a single value. Instead use the "contains" 
operator, with the field status as a suffix. Like:

[!is[system]tag[My Tag]contains:status[My Status]]

HTH

On Monday, June 15, 2020 at 2:39:33 PM UTC-7, OGNSYA wrote:
>
> I'm trying to filter a list by my own custom field "Status", which is a 
> list of tiddler names, but it only works if the value has no space in it.
>
> Here's my code (the tag part works fine):
>
> [!is[system]tag[My Tag]status[My Status]]
>
> If I remove the space from the "My Status" tiddler, and change the above 
> to "MyStatus", it works.
>
> What am I doing wrong? 
> Shouldn't this work the same as with tags?
>
> Thanks!
>

-- 
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/fb6976d8-e9df-4df6-9cfe-0b1bedbf01c6o%40googlegroups.com.