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
Kalpana DhanajayarajKalpana Dhanajayaraj 

Email VF TEMPLATE QUERY

I need to Display MISSING if both or one of the field is empty(address line1 address line 2)
If both hold values concatenate both and display.

Order Billing address : <apex:outputText value="{"!IF(AND(NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c)),
                 NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c))),
                !relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c + ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_Address_2__c ,'MISSING') }">
</apex:outputText>

this is not working .Any help would be great
The above code is not working .there is no error.
Sunil MadanaSunil Madana
Hi Kalpana, Can you remove extra double quotes after value=" as shown below and try?
<apex:outputText value="{!IF(AND(NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c)), NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c))), !relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c + ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_Address_2__c ,'MISSING') }">
Appreciate your feedback to this answer, if it works.

Thanks, Sunil.
Kalpana DhanajayarajKalpana Dhanajayaraj
 After removing " , getting the error : Incorrect parameter type for function 'not()'. Expected Boolean, received Text
Amit Chaudhary 8Amit Chaudhary 8
Please try below code. I hope that will help you
<apex:outputText value="{!IF( AND ( 
									NOT (ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c)),
									NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c))
								 ),
					relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c + ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_Address_2__c ,
					'MISSING' ) }" >
</apex:outputText>


 
Kalpana DhanajayarajKalpana Dhanajayaraj
Thanks All!