I am new to this.
Here is my problem I have columns for city, state, zip code. The problem with that was I could not formatted nicely for example:
Raleigh , NC 566777
Spring Field , OR 5552222
As you can see there are a lot of empty spaces. So I created a Formula field to make it look nice
Example:
Formula1field1: this is the code behind
{command.Mailing City} + ", " + {command.Mailing State/Province} + " " + {command.Mailing Zip/Postal Code};
This worked fine but the problem was if I have an empty zip code which is possible it won’t display the city or state. In some other cases I might have the city and the zip code not the state.
So for simplicity I changed the code behind the formula field to the following:
if ((Not IsNull({command.Mailing City}))and (Not IsNull({command.Mailing State/Province})) and (IsNull({command.Mailing Zip/Postal Code}))) Then
addre := {command.Mailing City} + ", " + {command.Mailing State/Province};
If ((Not IsNull({command.Mailing City}))and (Not IsNull({command.Mailing State/Province})) and (Not IsNull({command.Mailing Zip/Postal Code}))) Then
addre := {command.Mailing City} + ", " + {command.Mailing State/Province} + " " + {command.Mailing Zip/Postal Code};
the problem with this it is always executing the last if Statement
can you help me plz