Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Runs a named query that goes through the Store and Forward system. Note that the number of parameters in the function is determined by scope. Both versions of the function are listed on this page.

Note_friendly

Only Update Named Queries are allowed in Store and Forward.

Client permissions restrictions


Panel
titleGateway Scope Syntax

system.db.runSFNamedQuery([project], path, params)

  • Parameters

String  project The project name the query exists in. [optional]

String  path The path to the Named Query to run. Note that this is the full path to the query, including any folders.

Dictionary[String, Any] params - A Python dictionary of parameters for the Named Query to use.

  • Returns

Boolean - Returns true if successfully sent to the Store and Forward system.

  • Scope

Gateway, Perspective Session

Panel
titleProject Scope Syntax

system.db.runSFNamedQuery(path, params)

  • Parameters

String path - The path to the Named Query to run. Note that this is the full path to the query, including any folders.

Dictionary[String, Any] params - A Python dictionary of parameters for the Named Query to use.

  • Returns

Boolean - Returns true if successfully sent to the Store and Forward system.

  • Scope

Vision Client

Panel
titleCode Examples
Code Block
languagepy
titleSimple Example - Without Parameters
# This example runs a Named Query without any parameters in the Project scope.
# The second argument in the function is NOT optional, so namedNamed queriesQueries that do not require a parameter 
# must still pass an empty dictionary as an argument.

# Request the Named Query with an empty dictionary as the second parameter. 
system.db.runSFNamedQuery("folderName/myNamedQuery", {})
Code Block
languagepy
titleGateway Scope Example
# This example runs a Named Query without any parameters in the Gateway scope.
# The last argument in the function is NOT optional, so namedNamed queriesQueries that do not require a parameter 
# must still pass an empty dictionary as an argument.

# Request the Named Query to execute. 
system.db.runSFNamedQuery("ProjectName", "folderName/myNamedQuery", {})
Code Block
languagepy
titleSimple Example - With Parameters
# This example runs a Named Query while passing some parameters in the Project scope.
# The Named Query is assumed to have two parameters already defined on the Named Query:
# param1 : A string
# param2 : An integer

# Create a Python dictionary of parameters to pass
params = {"param1":"my string", "param2":10}
 
# Run the Named Query
system.db.runSFNamedQuery("myUpdateQuery", params)




Panel
titleKeywords

system db runSFNamedQuery, db.runSFNamedQuery