Skip 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.

If 1=1, 1. If 1=2, 2. Else, Show Message...

Featured Replies

Essentially, I have one field that has more than one "passcode". If 1=1, 1. If 1=2, 2. If Neither, Show Message: "Incorrect Password"

So far this is what I have, but it doesn't work as desired.

----

If 1=1, "Approved"

Else

Show Message: "Incorrect Password"

End If

If 1=2, "Approved"

Else

Show Message: "Incorrect Password"

End If

----

Any tips would be greatly appreciated.

Thank you kindly.

Could you provide a better explanation? AFAIK, 1=1 is always true, and 1=2 is always false, so I don't quite see the point in checking.

I think the OP is saying 1 is the field name.

If[Passcode = 1]

Show Custom Dialog["Approved"]

Else If[Passcode = 2]

Show Custom Dialog["Approved"]

Else

Show Custom Dialog["Incorrect Passcode"]

End If

Of course you could make the If statement

If[Passcode = 1 or Passcode = 2]

but the way I wrote gives you flexibility if you need to show different Approval messages for different passcodes.

Note to OP: Don't name your fields after numbers, even in examples.

  • Author

D J, I am currently using FileMaker 6 since we have some older systems around that don't support FM9.

Hence

There is no "Else If" command.

Your 1st example is exactly what I am looking for, the 2nd example does not work because I am pulling in different signature fields based on the Passcode entered.

Are there any other work arounds that don't use the "Else If" command?

Thanks for the feedback, I will be sure not to use numbers as field names in my examples.

Thanks again.

In version 6 you would use nested If blocks to achieve the same:

If [ Test 1 ]

# Result 1

Else

If [ Test 2 ]

# Result 2

Else

# Default Result

End If

End If

  • Author

D J and comment, thanks for your help, my Script now runs flawlessly. I didn't realize you can use nested If blocks, this will help out for some of my other Scripts as well.

Thank you kindly.

Edited by Guest

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.