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

Trying to wrap my head around ExecuteSQL().  I haven't used it enough to be fluent in it yet.

 

I have a calculation in the Classes table to count the number of boats in a region:

ExecuteSQL(
"SELECT count ("OwnerID")
FROM "Class Member Data"
WHERE
"Region" = ? 
and  "ClassID" = ?
and "ownerCurrent" = ?";
"";""; 1; ID; 1; 1
)

(ID is a field in the Classes table.)  

 

Which gives me a number, but not the same number as performing a Find for Region = 1 and ClassID = Classes::ID and ownerCurrent = 1 in a Class  Member Data layout.

 

So I want to create a list of OwnerIDs to see where the discrepancy lies to allow me to figure out the reason for it.

 

I created another calculation field

ExecuteSQL(
"SELECT"OwnerID"
FROM "Class Member Data"
WHERE
"Region" = ? 
and  "ClassID" = ?
and "ownerCurrent" = ?";
"";""; 1; ID; 1; 1
)

which only returns one OwnerID, where I was expecting a list of all OwnerIDs that fit the WHERE criteria.

 

What have I overlooked or misunderstood?

 

Are the region, ClassID and ownerCurrent fields numbers or text?

Why 4 optional variables when you are using 3?

What happens if you hard code the query into the select first?

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.