Search for specific words in all pages
Asked by Adrien:

Hello, I am setting up confluence for my organization so i'm new here :-)

I have a business need to be able to search in my space where some "keywords" are used in the content of the page (not in the labels).

Here is more detail :

- some pages of my space have tables describing fields of screens of a software we use (one line per field)

- in these tables there is a column for which I'll input only 2 possible values : XXX or YYY

I would like to know how I can later have a page displaying all the fields that have the value XXX for that column in all the pages of my space.

As I read through some other topics, this seems not really possible or no so easy, so any suggestion on how to reach a similar goal is welcome :-)

I also thought about using the macro include page when I need to write XXX, but then I need a way to retrieve all the lines where that macro has been included.

Thanks a lot for the support !


Answers:
author: Diego
body: Hello there, [@Adrien](/t5/user/viewprofilepage/user-id/3589437) . I would like to first welcome you to our community, the more the merrier!

So, you were *++pretty close++* to achieving what you need. The spirit of *++using macros is right++*, but we will need to use another duo of macros. Here they are:
> * ++**[\[Confluence Cloud\] Page properties macro](https://confluence.atlassian.com/confcloud/page-properties-macro-724765240.html)**++
> * ++**[\[Confluence Cloud\] Page properties report macro](https://confluence.atlassian.com/confcloud/page-properties-report-macro-724765250.html)**++

For *++server documentation++*, take a peek here:
> * ++**[\[Confluence Server\] Page properties macro](https://confluence.atlassian.com/doc/page-properties-macro-184550024.html)**++
> * [++**\[Confluence Server\] Page properties report macro**++](https://confluence.atlassian.com/doc/page-properties-report-macro-186089616.html)

Saying that we can use some macros is not enough. This requires some explanation. This duo of macros *++works as a group++* . The Page properties macro *++should contain a table with a set of keys and values.++*

*++Keys are the names++* for each value that we need to define. The *++values are the part where we most likely want to show in our reports++* . In pages where we have the page properties, we will also need to *++define a label for future reference.++*

The page properties report macro is the macro that will actually create a grouping of all the values from pages that have the pre-defined page properties. *++The page properties report will need to look into the label we created earlier.++*

One limitation is that*++we can only show one line of values++*. One line or a row is what is pre-defined to be the title line and another line or row is pre-defined as values.

So, here is how could proceed:
> 1. *Create the desired page*
> 2. *Insert a Page properties macro*
> 3. *Insert a table inside this macro*
> 4. *Define titles and values in that table*
> 5. *Publish the page*
> 6. *Define an appropriate label for this page*
> 7. *Create a new page*
> 8. *Insert the Page properties report macro*
> 9. *Define which label the macro should look for*
> 10. *Define which space the macro should be looking into*
> 11. *Save the macro*
> 12. *Publish the page*

The approach I present above is to work *++if you define the XXX or YYY inside those Page properties macro table++* . If you do so, their values should be displayed within the Page properties report macro as well. The values the report macro displays*++are automatically updated based on the pages where they originate from.++*

Adrien, I hope this serves as some guidance for you! Looking forward to your reply.

comments: author: Adrien
body: Hello [@Diego](/t5/user/viewprofilepage/user-id/1188952) , thank you very much for your detailed answer :-)

I understand the proposal and I think it might help but let me explain a bit more the request in order to be sure it can match the proposal.

Because as I read your example, I think that in my case the XXX or YYY are actually the "values" in your explanation, not the "keys" so not sure how this would work.

For instance, imagine the below table is defined in multiple pages in my space and adapted for each page (the parameters will be different) :

Parameters \| isVisible?

-----------------------

Param1 \| YES

Param 2 \| NO

Param 3 \| YES

So what I will need to provide as a report or so at the end of the day is a list of all the parameters for which the "isVisible" column is set to YES.

So it's easy for the business to visualize all the "Visible parameters" as a whole list.

I fear this is reaching the limitations of Confluence, but I'm open for any suggestion :-)

Thanks a lot again for the warm welcome and support !


author: Diego
body: Hello again, [@Adrien](/t5/user/viewprofilepage/user-id/3589437) !

Thanks for keeping the thread alive. You are right, your use case *++does go beyond++* the abilities of our macro.

Maybe some third-party is what you need to tackle this situation! Here, take a look at a couple of suggestions:
> * ++**[\[Confluence Cloud\] Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview)**++
> * ++**[\[Confluence Cloud\] Datatables for Confluence](https://marketplace.atlassian.com/apps/1220302/datatables-for-confluence?hosting=cloud&tab=overview)**++

Datatables for Confluence is available exclusively for Confluence Cloud, so if you are running a self-hosted version of Confluence, this plugin is not an option.

Let us hear from you, Adrien! Glad to have you here in our community.


author: Adrien
body: Hello [@Diego](/t5/user/viewprofilepage/user-id/1188952) thank you very much for your proposal, I will have a look at the Table Filer plugin as I'm running the server version of Confluence.

Have a nice day !