What is the equivalent of the has operator for Indexes

54 views
Skip to first unread message

TonyM

unread,
Mar 29, 2020, 6:46:18 AM3/29/20
to TiddlyWiki
Folks,

It seems easy to test for the existence of a field with the has operator, 
and even if it exists at all !has:field<fieldname> 
  • I have buttons to add something to a json data tiddler and give it a value Yes
  • I can reverse this with a button give it a value No
Can any one tell me how I can detect the index is not present at all?

Eg !has:index[indexname]

Thanks in advance
Regards
Tony

Joshua Fontany

unread,
Mar 29, 2020, 6:58:30 PM3/29/20
to TiddlyWiki
I could be wrong, but I don't think there actually is an equivalent that would retain the context of the previous filter output.

You could `...indexes[]match<testVar>]` but that would output the field name, not the name of the tiddler the field exists in.

I don't think it would be hard to add a `has:index[]` suffix to the Has Operator.

Best,
Joshua Fontany

TonyM

unread,
Mar 29, 2020, 7:16:31 PM3/29/20
to TiddlyWiki
Joshua

A surprise gap. I will try and solve it with a workaround and share back. I suspect emptyMessage or the else may be the answer

Regards
Tony

Reply all
Reply to author
Forward
0 new messages