Jump to content

This topic is 5357 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

Just have one calculation:

AddressLine1 & ¶ & AddressLine2 & ¶ & City &

(If(IsEmpty ( State ); Province; State))

& " " & PostalCode & ¶ &Country

This topic is 5357 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.