Forums

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

Comala Workflow: labeladded condition, NOT label

Marya Belanger
Contributor
November 2, 2021

Wondering if there's any way to say "do this when a label is added unless it's one of these labels: ..... "

 

Let's say I want to {set-message} when a label is added, unless it's label1, label2, or label3.

So I created a workflow parameter, @Excluded Labels@, that is pre-set to label1,label2,label3.

 

I've tried:

{trigger:labeladded | label =! @Excluded Labels@}

    {set-message}

    @label@ was added

    {set-message}

{trigger}

 

But that gives an error when I try to save, that ! can't be in a label name. I've also tried !"@Excluded Labels@" but same error.

 

I also tried:

{trigger:labeladded | @label@ =! @Excluded Labels@}

    {set-message}

    @label@ was added

    {set-message}

{trigger}

 

Trying to compare the value reference of the added label instead. That doesn't give an error but it seems to actually set @label@ equal to the values of @Excluded Labels@.

 

There must be some negation operator for the label field?

1 answer

0 votes
James Conway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 3, 2021

Hello @Marya Belanger 

You can use the haslabel condition with the labeladded trigger, however this condition does not accept workflow parameters so you will need to specify the labels. For example:

{workflow:name=Example Workflow}
{state:In Progress}
{state}
{state:Approved}
{state}
{trigger:labeladded|haslabel=apple,bacon,cheese}
{set-message}
the listed label - @label@ - was added
{set-message}
{trigger}
{trigger:labeladded|haslabel=!apple,bacon,cheese}
{set-message}
@label@ was added, it is not listed
{set-message}
{trigger}
{workflow}

You can always contact our friendly Customer Success team at https://support.comalatech.com with any questions you have about Comala Document Management or any other Comalatech product.

All the best

James 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events