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}

1 Answer 1


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)}
  • Thank you so much! have a nice day @Raul
    – MashaMasha
    Jun 22, 2022 at 11:00

You must log in to answer this question.

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