Forums

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

Confiform and Velocity Question

Stuart Wosika
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.
January 5, 2024

Hi guys,

 

I want to check a value is >= (greater than or equals to).  Below is an example.  

I get errors If I do this.  The only operator I seem to be able to get to qork is == ( is equals to).

I read the Velocity documentation that says I can do this.  

Can someone help please?

BR.

Stuart.

 

#set ($vasSize = "[entry.asSize]")


{
	#if ( $vasSize >= 0 ) 
   "update":
	{
		"issuelinks": [
    	{
			"add":
			{
				"type":
				{
					"name":"Relates",
					"inward":"relates to",
					"outward":"relates to"
				},
				"outwardIssue":
				{
                          "key":"[entry.idea1]"
                }
			}
		}
       ]
	}
	#end
}

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
January 7, 2024

Hi

Well, if you set the variable as text... 

#set ($vasSize = "[entry.asSize]")

It is a bit too much to expect it act as a numeric in >= conditions

Alex

Stuart Wosika
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.
January 8, 2024

Hi Alex,

 

sorry are you saying that if the variable is text rather than numeric then >= or <= works?

 

BR.

 

Stuart.

Alex Medved _ConfiForms_
Community Champion
January 9, 2024

Please refer to Velocity templating documentation for more details

This defines a text variable

#set ($vasSize = "[entry.asSize]")

But this defines a numeric variable

#set ($vasSize = [entry.asSize])

Alex

Stuart Wosika
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.
January 9, 2024

Hi Alex, thankyou for your patience and your support.  Silly mistake.  Now everything is working correctly. Regards. Stuart.

Like • Alex Medved _ConfiForms_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events