Jelly <j:if> condition issue

xiaix
Tera Guru

Trying to create a Jelly if condition that will essentially do this:

if ((jvar_calling_UI_Page == 'bcp_DEPT_Author_EDIT') || (jvar_calling_UI_Page == 'bcp_DEPT_FULL_VIEW' && bcpPROCESSES.u_name != ''))

I've come up with this:

<j:if test="(${jvar_calling_UI_Page == 'bcp_DEPT_Author_EDIT'}) || (${jvar_calling_UI_Page == 'bcp_DEPT_FULL_VIEW'} ${AMP}${AMP} ${bcpPROCESSES.u_name != ''})">

But it's not working.

I'm sure I just haven't had enough coffee this morning.   Could I get a little assistance with the correct way to form the jelly <j:if> syntax?

1 ACCEPTED SOLUTION

So I was correct.   This works:


find_real_file.png



Here's a good tip that I bet very few have ever encountered:



You cannot mix a <j:if> test condition with a jvar variable and a glide record field result


View solution in original post

10 REPLIES 10

This works:


find_real_file.png



But because of what I need, I can't do two separate j:if 's.     I need to use &&



For the life of me I can't get it to work.



This doesn't even work:


find_real_file.png



I ever mention how much I hate Jelly Script?


came across another eg, try



${AMP}


-Anurag

Tried that too, many times.   No luck.



What I'm wondering is if I'm even able to mix comparing jvar variables with gr record field results?   That *may* be where the issue is and why I can't combine these into one <j:if> statement?



I only ask because I see this OOB:


find_real_file.png


in the OOB UI Macro:   servicecatalog_cart_template


$[AMP]




-Anurag

Yeah, tried all variations.   No love.