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

I feel like the answer is right in front of me, but I can't seem to nail it. I keep getting a syntax error. Here is my calc (testing in the data view for now):

Let ([
      theDate = Totals_Daily::Daily_Totals_From_Date ; 
      ID = Totals_Daily::ID ; 
      query = 
               "SELECT SUM (Daily_Qty)
                FROM Totals_Daily
                WHERE Daily_Totals_From_Date=? AND ID=?
                GROUP BY Daily_Totals_From_Date,ID" 
          ];

      ExecuteSQL ( query ; "" ; "" ; theDate ; ID ) 

    )

If I remove the second parameter (ID) and simply sum by the date, I get a result. As soon as I add the "AND ID=?" I get a syntax error. 

ID is a reserved word. Try escape quoting the "name":

WHERE Daily_Totals_From_Date = ? ( AND \"ID\" = ? )

10 hours ago, beverly said:

ID is a reserved word.

ID is not listed as a reserved word in the documentation, and I encountered no problems using it as a field name without quoting it:

 

image.png.99b64473ceb6e40ed76e46682adf1cd4.png

 

 

 

10 hours ago, filemakerdeveloper40 said:

Here is my calc

Could you provide a description of the fields referenced in the calculation? Or even better, upload a small demo file, so we can reproduce the problem.

 

 

 

Edited by comment

  • 2 weeks later...

is it possible that the value is cast from a number to text or vice versa since the ID is set to a let variable? perhaps put the fields directly as arguments in the sql vs converting them to let scoped 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.