Hello all,
Below is a ViewTemplate tiddler that I use for all tiddlers tagged with DXQTH. QTH is an amateur radio term for listening post basically. So in my case, each location is where I’ve done some shortwave listening and logged stations. This view template using dynamic tables to show all logs of a given class heard from each location. The title of each QTH tiddler is the address for that QTH. This all works great as it is.
However, I would like to change this so that the state tiddler for the class selection is unique for each QTH. Right now, $:/state/qthviewclass is used for all. The reason I would like to do this is because I don’t always listen to the same class of station from each location. I would also like the state tiddler used for the dynamic tables to be unique per QTH. I’ve tried various ways I found through search here, but I haven’t found the right combination that would work. Any suggestions on the right way to go?
Thanks in advance!
\define is-dx-qth()
[<currentTiddler>tag[DXQTH]]
\end
<$set name="thisqth" value=<<currentTiddler>> >
<$list filter=<<is-dx-qth>> >
<fieldset style="margin-bottom: 5px;">
<legend style="font-size: 0.8em; margin-left: 1em; padding: 0 0.5em 0 0.5em;">Enter Search Criteria</legend>
<table class="table-borderless" style="font-size: 0.85em; accent-color: CadetBlue;">
<tr>
<td>Class: </td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="MWBC"> MWBC</$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="NDB"> NDB</$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="FM"> FM</$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="SWBC"> SWBC </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="NOAA"> NOAA </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="AirVHF"> AirVHF </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="Aircraft"> Aircraft </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="Time"> Time </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="TimeV"> TimeV </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="Spy"> Spy </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="WeaV"> WeaV </$radio></td>
<td><$radio tiddler="$:/state/qthviewclass" field="text" value="WeaD"> WeaD </$radio></td>
<td style="padding-left: 20px;">Total Logs: <$count filter="[tag[DXLog]dx-qth<thisqth>]"/></td>
</tr>
</table>
</fieldset>
<fieldset style="margin-bottom: 10px; padding: 5px 10px 0 10px; display: grid; font-size: 0.8em;">
<legend style="margin-left: 1em; padding: 0 0.5em 0 0.5em;">Logs</legend>
<table class="table-borderless" style="width: 20%; margin: 0;">
<tr>
<td>Class: {{$:/state/qthviewclass}}</td>
<td>Logs Returned = <$count filter="[tag[DXLog]dx-qth<thisqth>dx-class{$:/state/qthviewclass!!text}]"/></td>
<td>
<$button class="tc-btn-invisible" tooltip="Reset Pagination">{{$:/core/images/refresh-button}}
<$action-setfield $tiddler="$:/keepstate/dynamictables/$:/state/qthview/pagination/page-number" text="1" />
<$action-setfield $tiddler="$:/keepstate/dynamictables/$:/state/qthview/pagination/entry-per-page" text="25" />
</$button>
</td>
</tr>
</table>
<<table-dynamic filter:"[tag[DXLog]dx-qth<thisqth>dx-class{$:/state/qthviewclass!!text}]" fields:"dx-date dx-time dx-freq-khz dx-exact-khz dx-station dx-slogan dx-sinpo dx-language dx-mode dx-tx-location dx-state dx-country" pagination:"yes" editButton:"no" sortOp:"sortan" stateTiddler:"$:/state/qthview/pagination">>
</fieldset>
</$list>
</$set>