-1

Thanks for your help :)

I have this Javascript code:

if(civility == '' 
|| civility == undefined 
||(
civility != 'm' 
&& civility != 'm.' 
&& civility != 'mr' 
&& civility != 'mr.' 
&& civility != 'monsieur' 
&& civility != 'mme' 
&& civility != 'mme.' 
&& civility != 'mlle' 
&& civility != 'mlle.' 
&& civility != 'madame' 
&& civility != 'mademoiselle' 
&& civility != 'ms' 
&& civility != 'ms.' 
&& civility != 'mrs' 
&& civility != 'mrs.')
){
      if (name=='' || name == undefined){
        salutation = 'Chère Madame, Cher Monsieur,';
      }
      else if (name != '' && name != undefined){
        salutation = 'Chère Madame ' + name + ', Cher Monsieur ' + name + ',';
      }
    }

I have to convert it into AmpScript.

Anyone could help, please??

Thanks in advance

1
  • 6
    The purpose of SFSE is not to provide a coding service, based on your requirements, but advise you when you're stuck. You need to start by reading up on the basics of comparison operators and IF conditions in Ampscript. Also please go through some modules on the same subject on Trailhead. You are then welcome to return and show evidence of some research on your side. – Lukas Lunow Apr 6 at 8:05