June 3, 201015 yr hello all, I'm trying to create the perfect calculation for the following situation. I want to have a mailing address block field for every person in my database. I have a state field for people in the US and a province field for people abroad. I want fmp to use state and province according to what is available. I've tried several calculations: first of all, here's the basic one if I were to just compile info for people residing in the U.S. Mailing Address 1 = AddressLine1 & ¶ & AddressLine2 & ¶ & City& If(not IsEmpty(state);","&" "&state)& " " & PostalCode & ¶ &Country (I used this formula specifically city-state residents, i.e. Washington, DC) I also tried to break up the information, like so: state calc = If(not IsEmpty(State); ","&" " & State) then prov_state_calc = If(IsEmpty(state calc); ","&" " & Province) then plugging it into this formula: Mailing Address 2 = AddressLine1 & ¶ & AddressLine2 & ¶ & City& prov_state_calc& " " & PostalCode & ¶ &Country But I'm missing something, because I lose the data for state. I have tried various things, but nothing does the trick. thank you in advance for your assistance.
June 3, 201015 yr Just have one calculation: AddressLine1 & ¶ & AddressLine2 & ¶ & City & (If(IsEmpty ( State ); Province; State)) & " " & PostalCode & ¶ &Country
June 3, 201015 yr (If(IsEmpty ( State ); Province; State)) Well, if one of them is always empty then: State & Province would do the same thing.
Create an account or sign in to comment