Comparing to field value

Hi,

{{{ [tag[A]get[b]compare:number:gt[5]count] }}}

How do I get the above to work when comparing to the numbers contained in field c?

{{{ [tag[A]get[b]compare:number:gt[c]count] }}}

Thanks, Jon.

It depends upon which “field c” you want to compare with.

If field c is in the current tiddler, then you can use something like this:

{{{ [tag[A]get[b]compare:number:gt{!!c}count[]] }}}

However, if field c is in the same tiddler as field b, then use something like this:

{{{ [tag[A]] :filter[{!!b}compare:number:gt{!!c}] +[count[]] }}}

Note that within the :filter[...] syntax, the currentTiddler is automatically set to point to each of the tiddlers that match [tag[A]]. This allows you to use {!!b} and {!!c} to refer to the desired field values.

-e

It was the 2nd option that I needed and that worked and thanks for the explanation.

(I thought I’d try ChatGPT for the first time with a TW query to see what it would be like. After a few answers which even I knew were wrong, I thought, “I’ll just wait for Eric”)

Thanks again!
Jon