On Wednesday, March 4, 2020 at 3:39:35 PM UTC+3:30, Jeremy Ruston wrote:
>
> Hi Mohammad
>
> I assumed the below dataTiddler returns zero length string, but now I 
> understood it idoes not! The value of xx is missing!
>
>
> Indeed, the getindex operator and the get operator both work that way, the 
> great thing is that it lets you use the else[] operator to provide a 
> fallback value:
>
> [getindex[xx]else[defaultvalue]match[targetvalue]]
>

This is great, and I did not know that! 

>
> Best wishes
>
> Jeremy
>

Thanks for clarification

--Mohammad 

>
>
> {
>     "xx": "",
>     "yy": "hello"
> }
>
>
> Best wishes
> --Mohammad
>
> On Wednesday, March 4, 2020 at 2:47:14 PM UTC+3:30, Jeremy Ruston wrote:
>>
>> So,
>>  One should be very cautious to use is[blank]!
>>
>>
>> As Mark points out, the subtlety is that it checks for a zero length 
>> string, rather than checking for a missing result. I’m not sure “blank” was 
>> necessarily the best word to have chosen; we could always introduce an 
>> alias if there’s a clearer word for it.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>> --Mohammad
>>
>> On Tuesday, March 3, 2020 at 7:00:37 PM UTC+3:30, Mark S. wrote:
>>>
>>> isblank operates on the output of the new *split* operator, which might 
>>> be "mytitle" "" "someothertitle" "" etc.
>>>
>>> So there has to be a "" to determine if it is blank.
>>>
>>> Most filter operators do not produce "". If something is "", it puts out 
>>> NO output -- not even ""
>>>
>>> The operator getindex[xx] produces NO output, and so there is nothing to 
>>> evaluate. You get the same result whether you don't use is[blank] .
>>>
>>> So the upshot is, that is[blank] is mostly useful in the context of the 
>>> split and splitreg operators.
>>>
>>> On Tuesday, March 3, 2020 at 6:05:18 AM UTC-8, Mohammad wrote:
>>>>
>>>>
>>>>    - In tiddlywiki.com create a  new tiddler titled as *dataTid *and 
>>>>    set its type as application/json with below contents
>>>>
>>>> {
>>>>     "xx": "",
>>>>     "yy": "hello"
>>>> }
>>>>
>>>>
>>>>
>>>>    - in another tiddler issue the below command
>>>>
>>>> <$list filter="[[dataTid]getindex[xx]is[blank]]" emptyMessage="the 
>>>> index is NOT blank">
>>>> The index is BLANK
>>>> </$list>
>>>>
>>>> You get the wrong result. Why is[blank] does not detect the blank value 
>>>> of xx?
>>>>
>>>>
>>>> --Mohammad
>>>>
>>>
>> -- 
>> 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/c7fc0f81-fc26-4ebf-8ef8-f12e84d37b1f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/c7fc0f81-fc26-4ebf-8ef8-f12e84d37b1f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/ab836157-5364-484e-8a4c-26b7e4c55bb0%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/ab836157-5364-484e-8a4c-26b7e4c55bb0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/e3ac124a-24d6-4443-b5aa-239706a0c70d%40googlegroups.com.

Reply via email to