I have the following code to show a list of cell phones, which it grabs from the mobilePhone tag. Since not all mobilePhones have assigned users, it then goes through the user tags to find which ones have a cellPhone field equal to the current Cell phone. It puts this value in a variable so that I can put in a placeholder for the phones that have no user. Further down I get some more information about the phones from the mobilePhone and the phoneHardware tags.
What I’d like to do is sort it by the user name and I’d like to have all the ones that say spare instead of a name appear at the top of the list.
Hopefully that came across clear. Here is my code below (not sure if I am supposed to just paste it in or if there is a required format). This is my first day with TiddlyWiki, so if someone could point me towards the documentation where I could have found this answer myself, that would also be very helpful.
Thanks in advance.
<table>
<$list filter="[tag[mobilePhone]]" sort="[tag[user]]+[field:cellPhone{!!title}]">
<tr>
<$set name = "person" filter = "[tag[user]]+[field:cellPhone{!!title}]" emptyValue="Spare Phone" select=0>
<td>
<$link to=<<person>>/>
</td>
</$set>
<td><$link to=<<!!title>>/></td>
<td><$link to={{!!IMEI}}/></td>
<td><$view field= "planType"/></td>
<td><$view field= "simNo"/></td>
<$list filter="[tag[phoneHardware]]+[field:title{!!IMEI}]">
<td><$view field= "make"/></td>
<td><$view field= "model"/></td>
</$list>