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

Featured Replies

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

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.

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

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.

Create an account or sign in to comment

Important Information

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

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.