2

I have a Visualforce page which displays values from methods in its custom controller. The two static methods are called getJanuaryNBYTD() and getJanuaryCount() and they are set on the vf page.

I am now trying to evaluate these two expressions in an IF condition, such that if A or B are NOT NULL, then display the value from the division operator else, display '0'.

I am returning a 'syntax error' in the Dev console, with a line reference of '0'. I don't understand where I am going wrong?

<apex:outputText value="{0, number, ###, ### .##}"><apex:param value="{!IF(OR(ISNULL({!JanuaryNBYTD})), {!JanuaryCount}), '1', '0'}"/></apex:outputText>
0

1 Answer 1

7

Once you start a VF expression with {! - you don't reuse {!

{!IF(OR(ISNULL({!JanuaryNBYTD})), {!JanuaryCount}), '1', '0')}

should be

{!IF(OR(ISNULL(JanuaryNBYTD), JanuaryCount), '1', '0')}

You were also missing the final ) for the IF

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .