function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve BerleySteve Berley 

conditionally change text in vf page

I'm generating a pdf letter in a vf page and am tripping on a very simple thing...

If the field giftAmount, which is passed in from apex as say $2,500.00 is over 1000, I want to sign the lettter Sonja, otherwise I'd like to sign it Karen.

How do I do this in VF?

Current Code - gives generic "Syntax Error" message
{!IF( Value({!giftAmount}) >= 1000, "Sonja", "Karen")}

Thanks for the help...

Steve 
Naveen Rahul 26Naveen Rahul 26
Hello Steve,

In the below code you have used flower braces, i have striked them. thats not actually required, inside the expression
once you started {! you dont have to include in particular expression again.
 
{!IF( Value({!giftAmount}) >= 1000, "Sonja", "Karen")}
corrected code is below
 
{!IF( Value(giftAmount) >= 1000, "Sonja", "Karen")}

Thanks
D Naveen Rahul.