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.

Featured Replies

  • Newbies

I have a field define as a calculation type.

I want to create a nested if.

Ex. If(mother="deceased")and

If(father="deceased")

field="the late "

New to filemaker pro.. Not sure of the syntax. Thanks for your help...

Assuming you want the words "the late" to appear if both parents are deceased, otherwise the field is blank:

Field=

If(mother="deceased", If(father="deceased", "the late", ""), "")

The syntax is: If(condition, then, else). In this case, there's a nested "If" statement in the "then" part of the first "If" statement.

HTH,

Dan

quote:

Originally posted by oshnic:

I have a field define as a calculation type.

I want to create a nested if.

Ex. If(mother="deceased")and

If(father="deceased")

field="the late "

New to filemaker pro.. Not sure of the syntax. Thanks for your help...

For this particular instance, you don't need to nest the Ifs. You could do the following:

If( mother="deceased" and father="deceased", field="the late ", "" )

If there does come a time when a nested if would be what you want because you can't get what you need with the above kind of calc, you might want to take a look at the Case statement, which has syntax like this:

Case( test1, result1, test2, result2, default result)

The above is functionally equivelant to

If( test1, result1, If( test 2, result 2, default result ))

But you can see that if you have ten possibilities, a nested If can get pretty convoluted, which is why in general, the Case statement is prefered.

Chuck

I second that one, Chuck. I find myself using more and more Case statements almost to the exclusion of using the IF() statement. When written:

Case(

test1, result1,

test2, result2,

test3, result3,

default)

it is much easier to create, read, and debug. The added carriage returns and blanks cause no problems. -bd

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.