Jump to content

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

Recommended Posts

Hi,

 

I have a one record table that holds my password.

 

I would like to check to see if it is "NOT Empty".

 

If not empty then I want to call my "Admin Password" script.

 

The following if statement i wrote is ignored.

 

If ( ExecuteSQL ( " Select PasswordAdmin From Preferences Where PasswordAdmin Is Not Null "  ; "" ; "" )

 
Admin Passcode Script
 
 ) End If
 
I am having trouble locating simple examples for Filemaker, all the the examples for Filemaker are complicated to me and the W3 School only has the following  for Is Null ...
 
SELECT LastName,FirstName,Address FROM Persons
WHERE Address IS NULL
 
Any assistance I would be grateful.
 
Thank you.
 
Tom
Link to comment
Share on other sites

I don't think the issue is your understanding of ExecuteSQL() but of If().

 

If() will return False for non-numeric values. If your password contains only letters, you will run your script.

 

You need to wrap your ExecuteSQL() statement in an IsEmpty() function.

  • Like 1
Link to comment
Share on other sites

I would say, since it's a one-record table, just select the field without any conditions. Then tell your script what to do with the result. Something like:

 

Set Variable[ $pwd ; ExecuteSQL ( "Select PasswordAdmin From Preferences"  ; "" ; "" ) ]

If[ not IsEmpty( $pwd ) ]

Perform Script[ Admin Passcode Script ]

End If

Link to comment
Share on other sites

This topic is 2588 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
 Share

×
×
  • Create New...

Important Information

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