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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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)
$action.getHelper().renderConfluenceMacro("{database-query-compact:profile=LLInstallations|sql=$query}")

 

The error message I receive is:

error.png

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
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

302 views 23 8
Join discussion

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