Custom button to create page that uses info from other pages?
Asked by Laurence:

The idea is that there is a section of pages, several of the pages have tables with fields, and one page under the section of pages is a weekly report that would contain information based on the fields of the tables within the other pages.

What would be the best way of going about this?

1. Button under Operational Analysis Team Project Summary that generates Weekly Team Update page (if generating page is not possible, then at least inputs data into an existing table on page or creates table and inputs data on page)
2. Every page under Operational Analysis Team Project Summary has data that would be pulled into a table on Weekly Team Update

**Page Structure:**

![PageStructure.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/168209i17F1D10327D95693/image-size/large?v=v2&px=999 "PageStructure.PNG")

**Weekly Update Table:**

**![WeeklyUpdatePage.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/168210i0D3DFA61501788FD/image-size/large?v=v2&px=999 "WeeklyUpdatePage.PNG")**

**Example Page to Get Data From:**

**![ExamplePageToBeAddedToWeeklyUpdate.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/168211i5EE3C3CDF4E74108/image-size/large?v=v2&px=999 "ExamplePageToBeAddedToWeeklyUpdate.PNG")**


Answers:
author: Fabian Lim
body: Hi [@Laurence](/t5/user/viewprofilepage/user-id/4625142)

Welcome to the community. Thanks for all the details.

A few questions:

* Do the child pages always have the same name?
* Is the report weekly and get overwritten, or you have a new pages set every week dor each group to update?

comments: author: Laurence
body: Hello [@Fabian Lim](/t5/user/viewprofilepage/user-id/3131564), thanks for taking the time to check out my question!

Yes, the child pages would keep the same name and the weekly report is updated with more information each week, based on the information in the tables of the other child pages.

So a button would be on the Operational Analysis Team Project Summary page that allows for the Weekly Update page to be updated, whether by overwriting it or by adding information to the existing information that it contains.


author: Fabian Lim
body: Hi [@Laurence](/t5/user/viewprofilepage/user-id/4625142)

Try using the excerpt macro: <https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-include-macro/>

Regards


author: Laurence
body: Thanks! I think that macro would help.

Just one other question, it seems like it's not possible to actually have a button on a page that would create another page that has a table with information prefilled based on the info of other pages. Is that true that there's no functionality like that?


author: Fabian Lim
body: You may have to look into scripting plugins (scriptrunner, powerscripts) or confiforms.


author: Laurence
body: Thank you, I was also wondering if it would be possible to use the Confluence REST API to do that as well. For example, let's say I add a HTML macro that contains a \<button\> with a click event which makes a get request to all the child pages of a parent page to fetch info on them. After fetching the info it would make a post request to create a new child page (or update an existing one) with that collected information.

Does that sound like it could work?


author: Fabian Lim
body: I believe this is possible. You may want to start a new thread or look into existing posts for help.


author: Alex Medved _ConfiForms_
body: You can download Confluence DC (trial) and with 1 node it is almost the same as Confluence server

Installation is as easy as it was earlier with Confluence Server

HTML macros in Confluence cloud are available only through plugins is because it is very insecure - the way the auth is done in cloud apps allows you to quite easily steal an auth token

Alex


Tags: confluence-server

server