A response captured by the current integration step.
File
FileName, FileType
A file attachment value.
Prompt
Ask, Parameter
Parameter definitions and any values supplied by the user.
A context function that needs a concrete snapshot fails clearly when that snapshot is unavailable. For example, ResponseStatus() cannot run on a normal calculated field that has no captured HTTP response. Functions whose entries describe an optional value, such as ParentKey(), can return null instead.
The four device functions use one captured snapshot. This keeps latitude, longitude, location, and timestamp consistent within the same evaluation.Use them in workflows that capture device data, such as submission-time location recording:
Session functions help identify the current database, table, record, user, role, browser class, and URL. Use them for labels, routing, permissions-aware presentation, and integration payloads—not as a replacement for server-side access control.
Parameter declares or reads a prompt value. Ask checks whether required inputs are still missing and evaluates its condition after they are supplied. See Ask and parameter functions.
Last modified on September 7, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FarmTrace documentation","description":"Public guidance for FarmTrace Dsync, Device Kit, and the formula language.","colors":{"primary":"#1B6F45","light":"#4ADE80","dark":"#278A56"},"logo":{"light":"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/logo/light.svg?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=a32d62b068cf7f7610b6dbdfe9819f6a","dark":"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/logo/dark.svg?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=f209a8925c59e1d88e8f71da098175b7","href":"https://farmtrace.co.za"},"favicon":"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/favicon.png?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=cdb3c190e3d23b4128d11251a1cac33b","appearance":{"default":"system"},"background":{"decoration":"gradient","color":{"light":"#F3F4F1","dark":"#0B1F12"}},"navbar":{"links":[{"href":"https://farmtrace.co.za","label":"FarmTrace website"},{"href":"mailto:support@farmtrace.co.za","label":"Support"}],"primary":{"type":"button","label":"Visit FarmTrace","href":"https://farmtrace.co.za"}},"seo":{"indexing":"all"},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"farmtrace","hasAudioNarration":false,"actualSubdomain":"farmtrace","customDomains":["docs.farmtrace.co.za"],"gitSource":{"type":"github","owner":"farmtracedev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6a9ecfb050567d98f662842a","collectionId":"820c3df3-54bd-4eda-b24a-9dc94f6432f1","liveDeploymentHistoryId":"6a9ecfb050567d98f662842a","schemaVersion":"v3"},"entitlements":{},"buildId":"6a9ecfb050567d98f662842a","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Dsync","count":34},{"language":"default","tag":"Formula reference","count":16},{"language":"default","tag":"Configuration","count":8},{"language":"default","tag":"Device Kit","count":5},{"language":"default","tag":"Device Kit guides","count":5},{"language":"default","tag":"Function setup","count":4},{"language":"default","tag":"Dsync guides","count":3},{"language":"default","tag":"Formula language","count":3},{"language":"default","tag":"Start here","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"getting-started/formula-contexts","slug":"/getting-started/formula-contexts","pageMetadata":{"title":"Formula Contexts","description":null,"href":"/getting-started/formula-contexts"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Most formulas need only the values you pass to them. A smaller group reads information supplied by the screen or workflow where the formula runs.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Context`}),_jsx(_components.th,{children:`Functions`}),_jsx(_components.th,{children:`What must be available`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Current time`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Today`}),`, `,_jsx(_components.code,{children:`Now`})]}),_jsx(_components.td,{children:`The formula evaluation time and timezone.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Session`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AppId`}),`, `,_jsx(_components.code,{children:`TableId`}),`, `,_jsx(_components.code,{children:`RecordId`}),`, `,_jsx(_components.code,{children:`User`}),`, `,_jsx(_components.code,{children:`Role`}),`, `,_jsx(_components.code,{children:`URL`}),`, and related session functions`]}),_jsx(_components.td,{children:`An active Dsync/TeamDesk session snapshot.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Device`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`DeviceLatitude`}),`, `,_jsx(_components.code,{children:`DeviceLongitude`}),`, `,_jsx(_components.code,{children:`DeviceLocation`}),`, `,_jsx(_components.code,{children:`DeviceTimestamp`})]}),_jsx(_components.td,{children:`A captured device location and timestamp.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`HTTP response`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Response`}),`, `,_jsx(_components.code,{children:`ResponseHeader`}),`, `,_jsx(_components.code,{children:`ResponseStatus`})]}),_jsx(_components.td,{children:`A response captured by the current integration step.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`File`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FileName`}),`, `,_jsx(_components.code,{children:`FileType`})]}),_jsx(_components.td,{children:`A file attachment value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Prompt`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Ask`}),`, `,_jsx(_components.code,{children:`Parameter`})]}),_jsx(_components.td,{children:`Parameter definitions and any values supplied by the user.`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A context function that needs a concrete snapshot fails clearly when that snapshot is unavailable. For example, `,_jsx(_components.code,{children:`ResponseStatus()`}),` cannot run on a normal calculated field that has no captured HTTP response. Functions whose entries describe an optional value, such as `,_jsx(_components.code,{children:`ParentKey()`}),`, can return `,_jsx(_components.code,{children:`null`}),` instead.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`device-values`,children:`Device values`}),`\n`,_jsx(_components.p,{children:`The four device functions use one captured snapshot. This keeps latitude, longitude, location, and timestamp consistent within the same evaluation.`}),`\n`,_jsx(_components.p,{children:`Use them in workflows that capture device data, such as submission-time location recording:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DeviceLocation()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response-values`,children:`Response values`}),`\n`,_jsx(_components.p,{children:`Use response functions after a workflow has captured an HTTP response:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`If(ResponseStatus() >= 200 and ResponseStatus() \u003c 300,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Response(\"data.reference\"),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"Request failed\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Response()`}),` returns the raw body. A path can extract JSON or XML data, and an optional result type can convert it. See `,_jsx(_components.a,{href:`/reference/special#response`,children:`Special functions`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`session-values`,children:`Session values`}),`\n`,_jsx(_components.p,{children:`Session functions help identify the current database, table, record, user, role, browser class, and URL. Use them for labels, routing, permissions-aware presentation, and integration payloads—not as a replacement for server-side access control.`}),`\n`,_jsx(Heading,{level:`2`,id:`prompt-values`,children:`Prompt values`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Parameter`}),` declares or reads a prompt value. `,_jsx(_components.code,{children:`Ask`}),` checks whether required inputs are still missing and evaluates its condition after they are supplied. See `,_jsx(_components.a,{href:`/reference/ask`,children:`Ask and parameter functions`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Formula Contexts","description":null,"href":"/getting-started/formula-contexts"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Device values","slug":"device-values","depth":2,"children":[]},{"title":"Response values","slug":"response-values","depth":2,"children":[]},{"title":"Session values","slug":"session-values","depth":2,"children":[]},{"title":"Prompt values","slug":"prompt-values","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"farmtrace","siteName":"FarmTrace documentation","title":"Formula Contexts - FarmTrace documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-07T14:52:50.111Z","gitLastModified":"2026-09-07T12:27:48.000Z","originalFileLocation":"getting-started/formula-contexts.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Formula Contexts - FarmTrace documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.farmtrace.co.za/getting-started/formula-contexts\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://farmtrace.mintlify.app/_mintlify/api/og/v2?division=Formula+language\u0026amp;title=Formula+Contexts\u0026amp;theme=09ecce6343d2410fee452256\u0026amp;signature=e57dfab38b90a9229575be8c9c581e9a10cf1ddfdb3615582e769b02c41379bf\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Formula Contexts - FarmTrace documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://farmtrace.mintlify.app/_mintlify/api/og/v2?division=Formula+language\u0026amp;title=Formula+Contexts\u0026amp;theme=09ecce6343d2410fee452256\u0026amp;signature=e57dfab38b90a9229575be8c9c581e9a10cf1ddfdb3615582e769b02c41379bf\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/farmtrace/Ko51b9WVXdxCGCIX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1B6F45\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.farmtrace.co.za/getting-started/formula-contexts\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/getting-started/formula-contexts.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.farmtrace.co.za/#organization\",\"name\":\"FarmTrace documentation\",\"url\":\"https://docs.farmtrace.co.za\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/farmtrace/dU8dLDBOMj0npTRB/logo/light.svg?fit=max\u0026auto=format\u0026n=dU8dLDBOMj0npTRB\u0026q=85\u0026s=a32d62b068cf7f7610b6dbdfe9819f6a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.farmtrace.co.za#website\",\"name\":\"FarmTrace documentation\",\"url\":\"https://docs.farmtrace.co.za\",\"publisher\":{\"@id\":\"https://docs.farmtrace.co.za/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts#webpage\",\"url\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts\",\"name\":\"Formula Contexts\",\"dateModified\":\"2026-09-07T12:27:48.000Z\",\"isPartOf\":{\"@id\":\"https://docs.farmtrace.co.za#website\"},\"breadcrumb\":{\"@id\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Formula language\",\"item\":\"https://docs.farmtrace.co.za/getting-started/write-your-first-formula\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Formula Contexts\",\"item\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts#article\",\"headline\":\"Formula Contexts\",\"name\":\"Formula Contexts\",\"url\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts\",\"mainEntityOfPage\":{\"@id\":\"https://docs.farmtrace.co.za/getting-started/formula-contexts#webpage\"},\"dateModified\":\"2026-09-07T12:27:48.000Z\",\"publisher\":{\"@id\":\"https://docs.farmtrace.co.za/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.farmtrace.co.za#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FarmTrace documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"FarmTrace documentation","nav":{"global":null,"tabs":[{"tab":"Start here","icon":"compass","pages":[{"title":"Start here","href":""}]},{"tab":"Dsync","icon":"sprout","groups":[{"group":"Dsync guides","icon":"book-open","pages":[{"title":"Dsync","href":"/dsync"},{"title":"Field operations","href":"/dsync/field-operations"},{"title":"Sync and connectivity","href":"/dsync/sync-and-connectivity"}]},{"group":"Function setup","icon":"braces","pages":[{"title":"Function setup","href":"/dsync/function-setup"},{"title":"Form fields","href":"/dsync/function-setup/form-fields"},{"title":"Component types","href":"/dsync/function-setup/component-types"},{"title":"Component fields","href":"/dsync/function-setup/component-fields"}]},{"group":"Configuration","icon":"sliders-horizontal","pages":[{"title":"Table Setup Guide","href":"/dsync/table-setup"},{"title":"Table setup fields","href":"/dsync/table-setup/table-fields"},{"title":"Filters and role access","href":"/dsync/table-setup/filters-and-roles"},{"title":"Table screen fields","href":"/dsync/table-setup/screen-fields"},{"title":"Table screens","href":"/dsync/table-setup/table-screen"},{"title":"Reference data and scanning","href":"/dsync/table-setup/reference-data"},{"title":"Configuration patterns","href":"/dsync/table-setup/configuration-patterns"},{"title":"Troubleshooting and limitations","href":"/dsync/table-setup/troubleshooting"}]},{"group":"Formula language","icon":"braces","pages":[{"title":"Write your first formula","href":"/getting-started/write-your-first-formula"},{"title":"Values and references","description":"Reference fields, variables, users, roles, related data, and prompt parameters.","href":"/getting-started/values-and-references"},{"title":"Formula Contexts","href":"/getting-started/formula-contexts"}]},{"group":"Formula reference","icon":"book-open","pages":[{"title":"Formula index","description":"Browse all 146 supported TeamDesk-compatible functions and 15 operators.","href":"/reference/index"},{"title":"Conversion functions","href":"/reference/conversion"},{"title":"Text functions","href":"/reference/text"},{"title":"Date functions","href":"/reference/date"},{"title":"Time functions","href":"/reference/time"},{"title":"Timestamp functions","href":"/reference/timestamp"},{"title":"Numeric functions","href":"/reference/numeric"},{"title":"Rounding functions","href":"/reference/rounding"},{"title":"Aggregation functions","href":"/reference/aggregation"},{"title":"Null handling functions","href":"/reference/nulls"},{"title":"Duration functions","href":"/reference/duration"},{"title":"Location functions","href":"/reference/location"},{"title":"Special functions","href":"/reference/special"},{"title":"Session functions","href":"/reference/session"},{"title":"Ask and Parameter","href":"/reference/ask"},{"title":"Operators","href":"/reference/operators"}]}]},{"tab":"Device Kit","icon":"microchip","pages":[{"title":"Device Kit","href":"/device-kit"}]}]},"basePath":"","title":"Formula Contexts - FarmTrace documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":[],"chunks":[]}