set-message macro

set-message macro

Overview

Use the set-message macro to display an on-screen message.

It's great for keeping the user informed during the content production process when a workflow event or change occurs.

  • messages are shown between the page title and body content whilst viewing content (it's hidden from the edit screen)

  • messages can be configured as different panel displays

    • info

    • error

    • warning

    • success

  • if triggered by stateexpired or taskexpired events, the message is not shown until the page is refreshed

The set-message macro can be filtered to display the message only to a specific user(s).

A message filtered to display to a specific user includes an option for the user to remove it.

Messages filtered for users are removed after the user has viewed the message.

Messages can also be filtered using the view parameter to display a message on the workflow draft content URL or the workflow published content URL when the applied workflow has a final state.

The message is removed and replaced when a new trigger event occurs that includes a new set-message action macro (if the message is for the same audience). The message is cleared if the set-message macro in the trigger is empty.

Where to use it?

Optional.

One or more set-message macros can be added as action macros in a trigger macro.

{trigger:statechanged|state=Rejected} {set-message} The page content has been rejected. The content must be triaged. {set-message} {trigger}

A filter can be added to display the message to specific audiences - for example to one or more users, one or groups

{trigger:statechanged|state=Draft} {set-message:user=@user@} The page content has been moved to the Draft state. The content must be triaged before submitting for approval. {set-message} {trigger}

If more than one set-message macro is added to a trigger

  • only one message will be displayed on the page if all the messages are for everyone (unfiltered)

  • more than one set-message macro in the trigger will be displayed on the page if at least one of them is filtered to be displayed to a user(s), group(s) or the draft/published content

Parameters

Parameter

Required

Default

Notes

Ver

Parameter

Required

Default

Notes

Ver

unnamed first parameter

 

 

Deprecated Use the user parameter instead.

Deprecated v5.2

macro body





The message to display:



Replaces an existing message to the same audience; if the macro body is empty, the message panel is removed for that audience.

{set-message}{set-message}

A message that included view=draft requires the empty macro to be configured with the same parameter to remove the displayed message.

{set-message:view=draft}{set-message}

When using the set-message macro in a trigger initiated by an expiration event, page or space reference links (when the page title is set between [ ] to generate a link from it) are not supported.

However regular links as wiki markup, for example, [google|https://google.com] do work.

duration



How long should the message be displayed from the point at which it is set?



Default behavior depends on message audience:

  • unfiltered messages are shown indefinitely

  • if a group and/or user is specified, the message for an individual user expires once viewed by that user

In both cases, specifying a duration will override the default behavior.

group



unfiltered

Only show to users in specific user group(s)?

The message for an individual user expires once viewed by that user. It is not displayed for subsequent views of the page or if a transition has occurred before viewing.

The on-screen display of a message filtered to a specific group(s) can be removed from the screen for that member of the group using an X option displayed in the message panel.

The option to remove the message is not displayed if a duration parameter value is added to the macro.

Filter by label

There are no items with the selected labels at this time.

5.2

style



info





Message style: info, error, warning, success

o

o

o

o

if no style is added the default message display is info.

4.1

Obsolete The tip and hint styles are no longer supported (since v4.1) – use success and info, respectively, instead.

user



unfiltered

Only show to specific user(s)?

The message for an individual user expires once viewed by that user. It is not displayed for subsequent views of the page or if a transition has occurred before viewing.

The on-screen display of a message filtered to a specific user(s) can be removed from the screen for that user by using an X option displayed in the message panel.

The option to remove the message is not displayed if a duration parameter value is added to the macro.



view



both

Which types of content URL should the message be shown on?

Default - no inclusion of the parameter or value. The undisplayed parameter default value is both.

  • draft – the normal URL

  • published – the /public URL

  • both – both normal and public URLs

When view=draft or view=published is included the set-message macro the message is considered as a filtered message and can be used in the same trigger as an unfiltered set-message macro (the view parameter is default value of both)

5.2

This parameter determine which URL the message is shown when using same-space publishing:

If you're not using same-space publishing, all users see the normal URL by default.

 

For example,

If view=draft, the message is displayed when viewing the content in any state in the workflow

  • myconfluence.com/display/MSRM/Our+Page

But this message is not displayed when viewing the last approved version for a page with an applied workflow that includes a final state. The viewer sees this content URL with the /public pathway

  • myconfluence.com/public/MSRM/Our+Page

The filtered message view=draft is displayed on content in the final workflow state. The content in the final state has the normal URL and not the /public URL

 The user and group parameters can be used together:

  • groups are treated as if you listed their users via the user parameter

  • there can be only one message for a given user per view type

Unfiltered messages, those which do not specify user or group, are treated separately:

  • they are shown in addition to user or group messages

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.