Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

calculation for address in the U.S. and abroad

Featured Replies

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.

Just have one calculation:

AddressLine1 & ¶ & AddressLine2 & ¶ & City &

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

& " " & PostalCode & ¶ &Country

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

Well, if one of them is always empty then:

State & Province

would do the same thing.

Yes -- missed that logic on first reading

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.