I have just started using PocketQuey but and am not a Javascript coder. I am able to get some basic templates outputing data from a MSSQL datasource and am very happy with the result.
Some of my data records have blank or null vlaues. When this is the case I get the name of the field displayed instead of a blank field in my table. Can someone help. I looked through all the exmaple templates but cannot find a solution.
Here is my template....
<table class="confluenceTable">
<tbody>
#foreach ($row in $result)
<tr><th class="confluenceTh">Site Code</th><td class="confluenceTd">$row.site_code</td></tr>
<tr><th class="confluenceTh">Name</th><td class="confluenceTd">$row.site_name</td></tr>
<tr><th class="confluenceTh">Physical Address</th><td class="confluenceTd">$row.address<br>$row.suburb $row.State $row.Postcode</td></tr>
<tr><th class="confluenceTh">Migration Date</th><td class="confluenceTd">$row.migration</td></tr>
<tr><th class="confluenceTh">Phone/Fax</th><td class="confluenceTd">$row.phone<br>$row.fax</td></tr>
<tr><th class="confluenceTh">IT Contact</th><td class="confluenceTd">$row.contact_it</td></tr>
<tr><th class="confluenceTh">Maintenance Contact</th><td class="confluenceTd">$row.contact_maintenance</td></tr>
<tr><th class="confluenceTh">Network</th><td class="confluenceTd">$row.subnet</td></tr>
<tr><th class="confluenceTh">Beds</th><td class="confluenceTd">$row.beds</td></tr>
<tr><th class="confluenceTh">Users</th><td class="confluenceTd">$row.users</td></tr>
<tr><th class="confluenceTh">Workstations</th><td class="confluenceTd">$row.workstations</td></tr>
<tr><th class="confluenceTh">Manager</th><td class="confluenceTd">$row.contact_manager</td></tr>
#end
</tbody>
</table>
Cheers,
Aaran
Hey Aaran,
great to see that you solved your problem! You should probably accept your own answer so the thread gets marked as resolved. :)
As you probably already know from your other question we have moved our support to our service desk for PocketQuery.
Should you encounter any other problems with PocketQuery, please don't hesitate to raise a ticket at our service desk.
Thank you for using PocketQuery!
Best regards,
Sven (Scandio)
Ok so this is a Velocity newbie issue. I have added the ! mark to each of my variables and now get the result I was after.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.