Shiraz Dynamic Table from shadow tiddlers

Following the enlightening guidance I got from my previous question on querying shadow tiddlers, I’ve decided to try my luck with the Shiraz Dynamic Table macro.

  • I’m trying to build a (dynamic) table by querying shadow tiddlers created by importing a CSV.
  • The “parent” plugin tiddler is named Data/Terminals
  • Inside it are the children called Terminal-nnn, for n up to the low thousands
  • Children have fields such as:
    • Agent
    • Location
    • Service_ID
    • Terminal_ID

I’m using the following macro:

<<table-dynamic 
filter:"[all[shadows+tiddlers]prefix[Data/Terminals/]]" 
pagination:"yes" 
stateTiddler:"xyz"
>>

The macro returns an empty table but in its footer it states: “Displaying 1 through 25 of 1102 Results” which is the correct total number of entries. It looks like the filter is correct but nothing is displayed.

Any idea what I might be missing?

I am on mobile and cannot check what’s going here, but I assume list widgets inside dynamic table only list real tiddlers, not shadows.

I recommend to open the Shiraz dynamic table tiddler and correct the filters. There are few.

Thanks for the prompt reply.

I tried looking into $:/plugins/kookma/shiraz/macros/dtables/table-dynamic but I’m not well-versed enough in TW’s list/filter/macro syntax to figure out what to alter.

I’m assuming I’ll have to add something like all[tiddlers+shadows] somewhere but I don’t know where.

I’m not in a rush, have a look whenever you have some time.

Yes, that’s right. I will have a look this weekend if nobody answer you before that time

Yes, First Look for the use of [all[].. [all[tiddlers].. and replace with [all[shadows+tiddlers]... there may be a few other cases but they will most likely become obvious. Remember the default for any filter is [all[]... so a filter need not have this specified, however more often than not it is, from my experience.

Still trying to make this work, no luck yet. Here’s where I’m currently at:

In $:/plugins/kookma/shiraz/macros/dtables/table-dynamic the filter="[<fieldOrIndex>]-index" decides whether display_body_indexes or display_body_fields is called via a macrocall a few lines further down.

These two are defined in $:/plugins/kookma/shiraz/macros/dtables/table-utility. In both of these I’ve adjusted their list filter to be [all[tiddlers+shadows]subfilter<finalFilter>]. I also tried similarly adjusting the filter in the respective definitions for finalFilter of those two (tableFilter_indexes() and tableFilter_fields()) instead.

It didn’t make any positive effect, but at least it didn’t break anything either. The table footer still reports the correct number of total results but the table remains empty.

Hi @Lamnatos

-Open Shiraz 2.4.5 — create stylish contents in Tiddlywiki
-Create new tiddler with below script

<<table-dynamic filter:"[all[shadows+tiddlers]prefix[$:/plugins/kookma/utility]]" fields:"title tags">>```

-Save tiddler

Let me know what you see

I assume something goes wrong here! You did not specified any field to be shown, check my example above.

So, if everything else is fine then the code shall be like this

<<table-dynamic 
filter:"[all[shadows+tiddlers]prefix[Data/Terminals/]]" 
fields:"Agent Location Service_ID Terminal_ID"
pagination:"yes" 
stateTiddler:"xyz"
>>

Make use you are using the right Tiddlywiki version, before TW 5.1.23 you cannot have field name with letter in uppercase!

I checked Shiraz 2.4.5 and it shows shadow tiddlers without problem. So, Shiraz table-dynamic macro works as expected.

Could you send here or link to a minimum demo page to be able to check!

You’re right, the issue was that I did not state the fields parameter. Once I did, it worked as expected. I must have misread the documentation, I somehow thought that it was optional and if I omitted it, it would default to using all the fields it found in the result set.

Once it worked I also updated the search box example you gave in the documentation to make it search across all fields.

From this:

filter="[tag[sample]search{$:/temp/demo/dtable/search}]"

to this:

filter="[tag[sample]search:*{$:/temp/demo/dtable/search}]"

Once again, thank you for the great plugin and the help with my issue :slight_smile:

1 Like

Good catch! I will correct the documentation! The fields or indexes are required! :wink: