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.

Can ExecuteSQL return the table values from another file without a TO in the first?

Featured Replies

I have two files. FileA and FileB. I have a script in FileA in which I'd like to query data in FileB.

 

Here are my parameters:

    - FileA does not have a table occurrence for the table in FileB.

    - FileB is open with sufficient privileges

    - The process in FileA does have the correct TO and FIELDNAMES to query the data

 

I believe I am having an issue with scope.

 

Is there a way, without creating a TO in FileA, for the script in FileA to query the table in FileB using ExecuteSQL?

 

Thanks,

Jeff

I'm not sure, but I believe a TO of the table you're querying must be on the relationship graph of the file from which you are doing the query. They don't have to be related though.

  • Author

That's what I am beginning to think. I was hoping to not have to create file references and TOs to extract the data.

 

If anyone can think of a method, I'd appreciate it.

 

Thanks,

Jeff

Well you can kind of do it without a TO but you would still need a file reference...

 

You can create a script in FileB that performs the ExecuteSQL and passes it as a result back to FileA into a global field or variable, etc.

 

 

For example:

 

File A Script

 

Freeze Window

Perform Script ["runQuery" from file: "FileB" ]

Set Field [ zzg_results; Get(ScriptResult) ]

Close File ["FileB"]

 

 

File B Script

 

Exit Script [ Result: ExecuteSQL ( Your SQL Statement BLAH BLAH BLAH ) ]

  • Author

Hi John,

 

That's assuming you have a file reference and a script in FileB to call.

 

I am working another theory... If I somehow give the user a script to paste into FileB, I can reference the script using ScriptMaster's Run Script Immediately function. The function uses the FILENAME, SCRIPTNAME and PARAMETERS as inputs. The script the users pastes in would be a single line return like the one you posted.

 

Now, to put the script on the paste board without going into Manage Scripts and copy...

 

Thanks,

Jeff

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.