Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using regular expression on @pagetitle with Table Transformer to dynamic present content

Rafael Gilardino
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2023

Hi everyone.

 

I've been struggling for a while to automate a few pages in my Confluence space.

 

My use case is as following:

  1. I have a page with a table that I'm exposign using Table Excerpt with a list of capabilities with the respective components (I'm calling it Functions Masterlist) as follows:vodafunctable.png
  2. Then for each "Component Name" I have a dedicated page with the component specification and assets. One the assets is the list of capabilities that (as of today are spreadly defined in each one of the components pages) ideally I wanted to fetch from the "Functions Masterlist" leveraging both "Table Excerpt Include" and "Table Transformer"
  3. Those component pages have a predefined Title template as follows: "V-ODA (v0.40) - Level 2: Service Order Management"
  4. As you can see the Component Name column from the Functions Masterlist matches with the title content after the "2: " string from the Title

 

The help that I need is how to come up with a SQL query from the Table Transformer plugin that will allow to dynamically fetch the content from the Functions Masterlist based on a substring of Title page.

From my research I'd need to combine a regular expression (to fetch the content that is after the "2: " coming from the variable @pagetitle within the SQL query in the Table Transformer plugin.

My ultimate goal is to centrally manage the component functions while dynamically reflecting it in all pages.

 

1 answer

3 votes
Katerina Rudkovskaya [Stiltsoft]
Atlassian Partner
July 12, 2023

Hi @Rafael Gilardino,

Hope this example will help your case:

Wed 9-1.png

SELECT *,
'Pagetitle'->split(": ")->1 AS 'Component name'
FROM
(SELECT *, @PAGETITLE as 'Pagetitle' FROM T*)

Wed 9-2.png
Then you will be able to use another Table Transformer macro and merge your master table with mini tables pulled from the specification pages by the 'Component name' column.

Rafael Gilardino
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2023

It worked brilliantly! Thanks very much for the prompt support @Katerina Rudkovskaya [Stiltsoft] 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events