Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

Comala Document Management for Data Center
Results will update as you type.
  • Overview
  • Get started
  • User Guide
  • Workflow Authoring Guide
  • How to's and tutorials
    • Mini tutorials
    • Add an approval counter to fast-track an approval
    • Add parallel approvals in a state
    • Who can be assigned, or assign users to an approval
    • Use attachment events in workflow triggers
    • Use blog post events in a workflow trigger
    • Using comment events in workflow triggers
    • Customize approval decision buttons
    • Dynamic page header using a metadata value and triggers
    • Exporting to PDF with K15t PDF Exporter
    • How can I fast-track a single rejection or a single approval decision
    • Using different styles in a trigger message notification action
    • Using Read Confirmation events in workflow triggers
    • Select the workflow that is applied using content labels
    • Using labels when applying a workflow in space mode
    • State expiry dates
    • Use metadata to increment composite major, minor, patch content version on an approval decision requiring a parameter
    • Using set-message and metadata to display different information for the draft and published content
    • Updating a mandatory reviewer for an approval assigned using a workflow parameter
    • Publishing to another space in the same instance - different-space publishing
    • Require Parameters on a state transition
    • Publish to another instance using advanced remote-space publishing
    • Add, remove and set page restrictions using a workflow trigger
    • Using a CQL filter in the document states report macro to report on grandchildren of a page
    • Make tasks disable a review
    • Adding page activity to email
    • Add a label to child pages
    • Restricting drafts to specific users using the add-restriction macro
    • Use metadata to increment a content version
    • Add workflow review information to a header for inclusion in a page export
    • Tutorials ...
    • Using workflow parameters to create reviewer teams in a space
  • Reporting Guide
  • Administration Guides
  • Developer Guides
  • Integration Guides
  • Migrating to Confluence Cloud
  • Release notes
  • Support
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Using set-message and metadata to display different information for the draft and published content
    Updated Nov 14, 2024

    Using set-message and metadata to display different information for the draft and published content



    If you want to show different versions of metadata depending on if your users are viewing the draft or published versions when using same-space publishing you can use the view parameter of the set-message macro together with a metadata variable.

    The value of the metadata ReleaseVersion is set when the transition to the Approved state occurs using the set-metadata macro.

    Workflow template

    {workflow:name=Using set message published and draft view} {description} The Simple Approval Workflow {description} {state:In Progress|approved=Approved|taskable=true} {approval:Review|assignable=true} {state} {state:Approved|final=true|updated=In Progress|hideselection=true} {state} {trigger:statechanged|state=Approved} {set-metadata:ReleasedVersion}@version@{set-metadata} {set-message:view=published} Published view ||Released Version |{get-metadata:ReleasedVersion}| {set-message} {set-message:view=draft} Editor view ||Released Version|{get-metadata:ReleasedVersion}| {set-message} {trigger} {trigger:statechanged|state=In Progress} {set-message:view=draft} Draft view ||Version |{get-metadata:version}| {set-message} {trigger} {workflow}





    Related Pages

    • Same-space publishing

    • set-message macro

    • set-metadata macro

    • get-metadata macro

    First trigger

    The published content displays the view=published message on the public URL for the content

    • <hostname>/display/public/<spacekey>/<pagename>

    A user with edit permission viewing content in the Approved state, by default, does not see the public URL content. 

    To avoid this confusion, the first trigger has a second set-message action to cater to this scenario so that a user with edit permission sees a message in the Approved state.

    Second trigger

    The draft content displays the view=draft message. 



    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 25, "requestCorrelationId": "c23f57c18525480ea67223be56811025"}