Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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
Posted

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
Posted

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

Posted

Uhmm... just a general admonition against keeping any kind of passwords in a database. And another one against loading any kind of sensitive data into variables.

  • Like 1

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