Mohammad,It looks good. Perhaps placing this, or a variation of it, as an advanced search tab would be appropriate, because that is what it is.
I wonder if the field displayed in the preview slider which is currently text, could be set as well?
Just for fun I extracted your data tiddlers and created both a json and (minimalist) plugin to demonstrate sharing test data
MohammadVERY NICE!! Will be watching with interest to see if you come up with something better than my mad coding : D
Where is that? Is it the same you use in your documentation resource project?
I will add an install instruction on Tiddlyspot site for who likes to have only dynamic tables!I also keep it as a dedicated wiki for searchable dynamic table!
How to pack data as a plugin is surprisingly simple.
In advanced search filter list the tiddlers you want to include and export them as json.
Use the import button to import the json you just created but when the $:/import tiddler appears edit it, rename it, and keep only the plugin-type field with the value plugin.
Ideally I would like a method to bypass the export to file step for both plugin and JSON tiddler creation from a filter.
Regards
Tony
I am EXPERIMENTING how to implement a searchable dynamic table in Shiraz!My top priorities are
- modular design (extensible)
- minimalist design
- simple to use
- simple to understand
Today we had a fruitful thread with Eric Shulman who created a simple powerful UI to search and destroy!I used his design and approach with some minor changes and used it with table-fd the dynamic table builder from fields in Shiraz plugin.I have pushed an EXPERIMENTAL update and setup a wiki on tiddlyspot to get feedback!Now we have searchable dynamic table builder!
\import TiddlyTools/FilterGenerators/PowerSearch
\define doSearch_showresults()
<$macrocall $name=table-fd
filter=<<filter>> tblClass=""
fields="tbl-expand title fa fb fc caption tags"
stateTiddler=n
tblCaption="''Table 2. Dynamic table example''"/>
\end
\define getOptions() <!-- NO DISPLAY OPTIONS -->
<<setStyles>>
<<getInputs>>
<$vars
tids={{{ [<tidinput>get[text]] ~[[tiddlers]] }}}
pre={{{ [<preinput>get[text]] }}}
tag={{{ [<taginput>get[text]] }}}
field={{{ [<fieldinput>get[text]] ~[[title,text,tags]] }}}
flag={{{ [<flaginput>get[text]] ~[[words]] }}}
term={{{ [<terminput>get[text]] }}}
sort={{{ [<sortinput>get[text]] ~[[title]] }}}>
<<doSearch>>
</$vars>
The result: my latest search input interface, with the Shiraz table output!enjoy,-e
@Eric: @Mohammad:This is a really nice collaboration result!
<$list filter=<<filter>>>
<$checkbox tiddler="$:/temp/selectedTiddlers" index=<<currentTiddler>> checked=" "
checkactions="""<$action-setfield $tiddler="$:/temp/selectedTiddlers" $index=<<currentTiddler>> $value=" " />"""
uncheckactions="""<$action-setfield $tiddler="$:/temp/selectedTiddlers" $index=<<currentTiddler>> />""">
<$text text=<<currentTiddler>>/>
</$checkbox><br>
</$list>
<$button> DO STUFF!
<$list filter="[title[$:/temp/selectedTiddlers]indexes[]>
<$action... tiddler=<<currentTiddler>> ... />
</$list>
</$button>
I have both of your tiddlers copied. And as expected the PowerSearch works on its own perfectly. I have also installed the Shiraz plugin and working on its own as well. Then I created another tiddler containing the overriding definitions which you've given here ( I had to change the macro call name to table-dynamic which I assume changed at a later date). I can see that PowerSearch is being called because the result table is shown but I don't have PowerSearch UI. What might I be doing wrong?
\import TiddlyTools/FilterGenerators/PowerSearch
\define doSearch_showresults()
<$macrocall $name=table-fd
filter=<<filter>> tblClass=""
fields="tbl-expand title fa fb fc caption tags"
stateTiddler=n
tblCaption="''Table 2. Dynamic table example''"/>
\end
\define getOptions() <!-- NO DISPLAY OPTIONS -->
<<setStyles>>
<<getInputs>>
<$vars
tids={{{ [<tidinput>get[text]] ~[[tiddlers]] }}}
pre={{{ [<preinput>get[text]] }}}
tag={{{ [<taginput>get[text]] }}}
field={{{ [<fieldinput>get[text]] ~[[title,text,tags]] }}}
flag={{{ [<flaginput>get[text]] ~[[words]] }}}
term={{{ [<terminput>get[text]] }}}
sort={{{ [<sortinput>get[text]] ~[[title]] }}}>
<<doSearch>>
</$vars>