"... you mean these fans?" Posted July 2, 2014 Posted July 2, 2014 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 PersonsWHERE Address IS NULL Any assistance I would be grateful. Thank you. Tom
David Jondreau Posted July 3, 2014 Posted July 3, 2014 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. 1
Fitch Posted July 3, 2014 Posted July 3, 2014 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
comment Posted July 3, 2014 Posted July 3, 2014 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. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now