Skip to main content
added 3 characters in body
Source Link
EazyE
  • 8.7k
  • 1
  • 14
  • 27

I've attempted to use the following AMPscript to show nothing if a field contains no value. It is erroring, no doubt because there is an obvious syntax error somewhere, but I cannot see where.
Any help would be appreciated.

%%=iif(empty(@Variable_Scholarship_Name__c),"",Scholarship Title: %%Variable_Scholarship_Name__c%%  

Scholarship Amount: $%%=FormatNumber(AttributeValue("Variable_Scholarship_Amount__c"),"#,###")=%%=%%=%%
=%%

If the field is not empty, I need the email to display as follows:

Scholarship Title: Genius

Scholarship Amount: $20

Thank you in advance!

I've attempted to use the following AMPscript to show nothing if a field contains no value. It is erroring, no doubt because there is an obvious syntax error somewhere, but I cannot see where.
Any help would be appreciated.

%%=iif(empty(@Variable_Scholarship_Name__c),"",Scholarship Title: %%Variable_Scholarship_Name__c%% 
Scholarship Amount: $%%=FormatNumber(AttributeValue("Variable_Scholarship_Amount__c"),"#,###")=%%=%%

If the field is not empty, I need the email to display as follows:

Scholarship Title: Genius

Scholarship Amount: $20

Thank you in advance!

I've attempted to use the following AMPscript to show nothing if a field contains no value. It is erroring, no doubt because there is an obvious syntax error somewhere, but I cannot see where.
Any help would be appreciated.

%%=iif(empty(@Variable_Scholarship_Name__c),"",Scholarship Title:%%Variable_Scholarship_Name__c%%  

Scholarship Amount: $%%=FormatNumber(AttributeValue("Variable_Scholarship_Amount__c"),"#,###")=%%
=%%

If the field is not empty, I need the email to display as follows:

Scholarship Title: Genius

Scholarship Amount: $20

Thank you in advance!

Source Link

AMPscript required. Show nothing if a field is empty

I've attempted to use the following AMPscript to show nothing if a field contains no value. It is erroring, no doubt because there is an obvious syntax error somewhere, but I cannot see where.
Any help would be appreciated.

%%=iif(empty(@Variable_Scholarship_Name__c),"",Scholarship Title: %%Variable_Scholarship_Name__c%% 
Scholarship Amount: $%%=FormatNumber(AttributeValue("Variable_Scholarship_Amount__c"),"#,###")=%%=%%

If the field is not empty, I need the email to display as follows:

Scholarship Title: Genius

Scholarship Amount: $20

Thank you in advance!