If Statement with "and" and "Or
I hope you can help me with this problem. I am not a pro at this but each day I am learning something new.
Here is what I want to accomplish.
If {Field Rep} = "" AND if {Field Role} = Rec\Rpt\Ord OR Rec\Rpt OR Rpt\Ord OR Ord OR Rec then insert {Field Address} else {AltAdd}.
If {Rep} <> "" And {Rep} has data, my outcome should be:
Company #1
123 NW 19th St, Washington DC 11111
However, If {Rep} = "" then my outcome should be:
Joe Blo
8901 Coral Ave, New York, NY 22222
Below is what I tried to accomplish this but it didn't work.
{IF{= OR ({ COMPARE {Field Rep} = Rec\Rpt\Ord}, {COMPARE {Field Rep} = Rec\Rpt}, {COMPARE {Field Rep} = Rpt\Ord},{ COMPARE {Field Rep} = Ord}, { COMPARE {Field Rep} = Rec }) {Rep}
{Address}" "
{Altname}
{AltAdd}"}
I attached a spreadsheet to see an example of the db.
Thanks in advance for your help.
|