Jump to content
  • 0

using >= in formula not showing as true for the equal


Jodie

Question

I've been avoiding using greater than or equal in my calculation fields because I can't get it to return true when the value is equal. I'm trying to use the following CASE WHEN to display/hide blocks of html and fields when the condition is true, but it always hides the "=" field - so where I want the 10th item to display, it will only show the first 9 and hide the remaining. I've used work arounds in the past, but I really want to understand what I'm doing wrong.

This is the syntax I've used. Any ideas?

CASE 
WHEN [@field:PW_tbl_progitems_itemnum] >=10  THEN "block;"
ELSE "none;"
END

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Jodie

I tested your formula on my end, it worked fine.
Supposing your field is Integer this formula should work:
 

CASE 
WHEN [@field:PW_tbl_progitems_itemnum] >=10  THEN 'block;'
ELSE 'none;'
END

If your field is other than Integer then you could cast the value to integer:
 

CASE 
WHEN CAST([@field:PW_tbl_progitems_itemnum] AS int)  >=10  THEN 'block;'
ELSE 'none;'
END

The Output:

image.png.496ab08a47af5e78da2ffd6abf924613.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...