Course contents6 lessons
Course overview
  1. Queries Basics
  2. Displaying the Results of Queries
  3. Binding Query Results to Named Ranges
  4. 04Using Query Results in Calculations
  5. 05Decoupling Data from a Spreadsheet Using Queries
  6. 06Query Triggers

Lesson 4 of 6

Using Query Results in Calculations

We can split queries into two groups in terms of how they are evaluated in calculations, static queries and dynamic queries. The main difference between the…

1 min read

We can split queries into two groups in terms of how they are evaluated in calculations, static queries and dynamic queries. The main difference between the two is how they affect the order of calculations.

Static queries are those that don’t depend on input fields from your web application. This means that the results of the query will not be affected by any changes in the user inputs. If your application contains only static queries,

  1. the system will execute the queries and populate the query results into the named ranges they are bound to
  2. the system will trigger the workbook formula calculations

Queries that depend on application inputs are considered dynamic queries. If there are any number of dynamic queries in your web application,

  1. the system will trigger the workbook formula calculations to get the input results
  2. the queries will run and the results will be populated for the bound named ranges
  3. the system will trigger the workbook formula calculations one more time

This means that the workbook calculations will effectively be executed twice within one cycle.