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.

Get functions with execute sql

Featured Replies

Is it possible to use Get functions within execute sql statements such as...

 

ExecuteSql("

 

SELECT dept_t

 

FROM employees

 

WHERE employee_id = ?"

 

; ""; ""; Get(AccountName))

 

I have tried this statement and I can't get it to evaluate in the data viewer.

Is it possible to use Get functions within execute sql statements […]

 

You can use whatever you like to build a string which is a valid SQL statement, including native Filemaker functions as parameters (taking into account the usual caveats as context and [in the case of Get() functions] stored vs. unstored, etc.).

 

Here is your function used verbatim:

 

post-80889-0-40501200-1410529686_thumb.p

 

[…] I have tried this statement and I can't get it to evaluate in the data viewer.

 

Did you get an error, or an empty result?

  • Author

Empty Result

empty result means that there is no syntax error but that there is really nothing found.

 

I would capture the Get(AccountName) in its own variable and use that variable in the SQL query.  Much easier to troubleshoot.

 

Remember that SQL is case sensitive.  So if the data record has "Wim" but I log in with "wim" then there will be no match.

The FM account names are not case sensitive.  So you may want to convert your data to all lower or all upper case and do the same with the result of the Get(AccountName) function,

  • Author

Thanks.  That was it, the case sensitivity.

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.