Retrieve and Reuse Data
Use SOQL once, then reuse returned values anywhere in your S-Docs template for calculations, headers, and dynamic content.
Use this section when you need to run SOQL once and reuse the returned values across an S-Docs template.
This pattern is useful for sentences, headers, footers, calculations, and conditional output.
Use it when a full table would add noise, but the query result still drives document content.
Start with the path that fits your goal
If you are new to named queries, start with the tutorial.
If you already know the output you need, use the how-to guide.
If you need exact syntax, structure, or supported patterns, use the reference.
What you can do with retrieve and reuse data
query a value once and reuse it across the template
place returned values in sentences, headers, footers, and formulas
return filtered, grouped, or aggregate results without rendering a table
keep complex output cleaner by referencing saved query values
Browse by topic
Related note
Use Insert Data Tables when you need repeating rows instead of reusable values inside template content.
Last updated
Was this helpful?

