1 of 1 people found this helpful
As you have discovered, this is not something that you can use a variable for.
You have two basic approaches
1) Use a relationship that, for each record matches only to the specified address and then use fields from the related table occurrence on your layout.
2) Define calculation fields that return one address or the other and use the calculation fields on your labels layout.
Thank you Philmodjunk,
Would you or someone out there be kind enough to get me started down the correct path with an example calculation?
A self join relationship might be simpler but:
If ( Students::Proof Mailing Location = "Local Address" or
IsEmpty ( Students::Proof Mailing Location ) or
Students::Proof Mailing Location = "Do Not Mail Home Proofs" ;
List ( Students::Secondary Address Line 1 ;
Students::Secondary Address Line 2 ;
Students::Secondary City & ", " & Students::Secondary State & " " & Students::Secondary zip code ) ;
/*Else*/ List ( Students::Address Line 1 ;
Students::Address Line 2 ;
Students::City & ", " & Students::State & " " & Students::zip code )
) // if
BTW, the If steps in your script are not set up correctly. Compare them to how I set it up in the If function in my last post to see the difference.
Thank you so very much! This will definitely get me going.
I figured it out.
This may not be the cleanest but for anyone else who is learning and may run across this post in the future, this is how I modified the calculation philmodjunk helped me with to use the opposite field if it was empty.
If ( not IsEmpty ( Secondary Address Line 1 )and Proof Mailing Location = "Local Address" or not IsEmpty ( Address Line 1 ) and
IsEmpty ( Proof Mailing Location ) or not IsEmpty ( Secondary Address Line 1 ) and
Proof Mailing Location = "Do Not Mail Home Proofs";
List ( Secondary Address Line 1 ;
Secondary Address Line 2 ;
Secondary City & ", " & Secondary State & " " & Secondary ZIP Code ) ;
/*Else*/ List ( Address Line 1 ;
Address Line 2 ;
City & ", " & State & " " & Zip )
) // if
Since this creates a list, you have to use one data field and you have to make sure your field box is large enough to contain the entire contents.