Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted (edited)

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

This topic is 6121 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.