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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events