Jump to content

If/Then Statement


DVincent

Recommended Posts

Good afternoon everyone,

 

I have a business card that contains a phone and fax number on the same line which would be separated by a "/"

 

Neither number is mandatory so I need a script that will show the "/" only when both numbers are in use. Also the phone number when used needs to have a "Tel. " in front of it and the fax number needs to have a "Fax " in front of it.

 

Any help would be greatly appreciated

Link to comment
Share on other sites

DVincent

Here you go:

 

if ((Field("Phone") != "") && (Field("Fax") != ""))

 

return Field("Phone")+"/"+Field("Fax");

 

else if ((Field("Phone") != "") && (Field("Fax") == ""))

 

return Field("Phone");

 

else if ((Field("Phone") == "") && (Field("Fax") != ""))

 

return Field("Fax");

 

else

 

return "";

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...