Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Calling an application within a user macro?

Hey everyone,

I am trying to use an application called "Database Connector" which uses SQL to create tables within confluence. However, when I try to call the database-query macro within a user macro it does not recognize the name despite being able to use this within a page to call the macro. Example macro below:

## example (works for panel macro)
$action.getHelper().renderConfluenceMacro("{panel:title=Title|borderStyle=none|bgColor=#f3f3f3} paragraph {panel}")

## example (fails for database connector macro)


The error message I receive is:


The purpose of this is the application does not accept parameters or output wiki markup correctly, so I am looking for a free alternative to do this. Thanks for reading and any help would be greatly appreciated!

1 answer

0 votes
Bill Bailey Community Leader Nov 20, 2020

If I remember correctly, the renderConfluenceMacro method only worked for older style macros which supported wiki markup for entry. There is no equivalent for the newer style macros.

What you CAN do is create a wrapper macro that includes and configures the macro you want using its storage format version.

I wrote an article on how do to do this: Getting Started with User Macros - Writing a Wrapper Macro 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,631 views 7 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you