How to print just print output without table's lines and without header?
Asked by Pavel Potcheptsov:

pocket_query.png

I have a query that returns value 83. Is it possible not to print table and heading and just show expected output, i.e. **83**?  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-print-just-print-output-without-table-s-lines-and-without/qaq-p/306206?attachment-id=6202){#link_118fb92f7b510c}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/51686/1/pocket_query.png){#display_118fb92f7b510c_0}  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-print-just-print-output-without-table-s-lines-and-without/qaq-p/306206?attachment-id=6203){#link_118fb92f7b510c_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/51686/2/pocket_query1.png){#display_118fb92f7b510c_2}  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-print-just-print-output-without-table-s-lines-and-without/qaq-p/306206?attachment-id=6204){#link_118fb92f7b510c_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/51686/3/pocket_query2.png){#display_118fb92f7b510c_4}


Answers:
author: Carla Roocks (Scandio)
body: Hi Pavel,

Thank you for using PocketQuery!

Of course, it is possible to omit the table heading. You will first need to create your own custom template. Templates are used to define how the result set should be displayed. After that, go to your query and change the used "template" to the one you just created.

A simple template, that displays the usual table without the header, would look like this:

```
&lt;table class="pocketquery-table confluenceTable"&gt;#foreach ($row in $result)&lt;tr class="#if($velocityCount % 2 != 0)odd#{else}even#end"&gt;#foreach ($column in $row)&lt;td class="col-$velocityCount"&gt;$!column&lt;/td&gt;#end&lt;/tr&gt;#end&lt;/table&gt;
```

<br />

If you want to print only the bare result value itself, without any table or other surrounding HTML, you could use the following template. It makes the most sense if there is only one single result value. The first line removes the div container, that normally wraps all rendered PocketQuery macros.

```
## @param plain:true#foreach ($row in $result)#foreach ($column in $row)$!column#end#end
```

There is a lot you can do with templates. We included different examples in the [PocketQuery documentation](https://www.scandio.de/atlassian/en/plugins/pocketquery) (templating is the last tab), I encourage you to have a look at them.

Hope this helps! Please let me know, if you have more questions.

comments: author: Pavel Potcheptsov
body: Thank you dear Carla!

After applying you second solution I was able to insert pocketquery macro directly to table.

pocket_query1.pngpocket_query2.png

However this seems to break total sum row calculation but in this case it's not a big deal.


author: Felix Grund (Scandio)
body: It should be possible even shorter like this, assuming your column name is "Ektos":

```
## @param plain:true$result.get(0).Ektos
```

Question: how do you do your sum calculation?


author: Andrey Khaneev _StiltSoft_
body: Hi Pavel,

You can filter this table by default using [Table Filter](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter/server/overview) macro.

comments: author: Felix Grund (Scandio)
body: Might work, but I would not recommend it because PocketQuery has its own filtering abilities that should perform much better than filtering the table with JS afterwards.


Tags: confluence-administration