0

I have a data table in a visualforce page where I would like to display "nothing here" if my sObject field is empty, but if there is something written inside i would like to display it. i was trying something like this but it doesnt work:

{!if(Custom_Object__c.field__c = ISBLANK(), "nothing here", {!Custom_Object__c.field__c}

New contributor
MashaMasha is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

0

The proper syntax would be to use the IF statement, then check ISBLANK in condition like ISBLANK(Custom_Object__c.field__c). And you do not have to use a merge field inside a merge field, so everything goes inside single merge field {!YourValue}.

Try this:

{!IF(ISBLANK(Custom_Object__c.field__c), "nothing here", Custom_Object__c.field__c)}
1
  • Thank you so much! have a nice day @Raul
    – MashaMasha
    Jun 22 at 11:00

Your Answer

MashaMasha is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.