Requires: an expression, one or more same-type value/result pairs tested for equality, and an optional final fallback. A null value does not match, including another null.
Returns: the selected result, the fallback, or null when nothing matches and no fallback is supplied.
Best for: converting codes or categories into labels and outcomes.
Prefer SHA2_256 or SHA2_512 for new integrations. Use older algorithms only when the receiving service explicitly requires them.
Formulas are evaluated on the client. Never embed a reusable signing secret in a formula or client-readable field. When a key must remain secret, sign the request on a server or through a protected integration.
Returns the body of a captured HTTP response or extracts a value from it.
Syntax:Response(), Response(path), or Response(path, type)
Requires: an HTTP response captured by the current integration step. Paths use dotted/indexed JSON form such as data.items[0].id, or XPath for XML.
Returns: raw Text body with no arguments; extracted Text by default; Text, Bool/Boolean, Numeric/Number, Date, Time, or Timestamp when a type is requested. A missing JSON or simple XML path returns null; an XPath string expression with no match can return empty Text.
Best for: reading identifiers, statuses, dates, and other values returned by an API.
Returns the status code of the captured HTTP response.
Syntax:ResponseStatus()
Requires: an HTTP response captured by the current integration step.
Returns: Numeric HTTP status code.
Best for: success/failure routing and retry decisions.
Between(ResponseStatus(), 200, 299)
Response, ResponseHeader, and ResponseStatus are only available after the current workflow has captured a response. They do not make an HTTP request themselves.
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":"reference/special","slug":"/reference/special","pageMetadata":{"title":"Special functions","description":"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.","href":"/reference/special"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"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={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Some functions on this page need data supplied by the form or workflow. Check each `,_jsx(_components.strong,{children:`Requires`}),` line before using one in a normal calculated field.`]}),`\n`,_jsx(Heading,{level:`2`,id:`between`,children:_jsx(_components.code,{children:`Between`})}),`\n`,_jsx(_components.p,{children:`Checks whether a value is inside an inclusive range.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`Between(value, minimum, maximum)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` three non-null comparable values of the same type.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Boolean; `,_jsx(_components.code,{children:`null`}),` in any position produces `,_jsx(_components.code,{children:`false`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` acceptable measurement, date, and quantity ranges.`]}),`\n`]}),`\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:`Between([Moisture], 10, 14)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`case`,children:_jsx(_components.code,{children:`Case`})}),`\n`,_jsx(_components.p,{children:`Matches one expression against a series of values and returns the result paired with the first match.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`Case(expression, value, result[, value, result...][, elseResult])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` an expression, one or more same-type value/result pairs tested for equality, and an optional final fallback. A `,_jsx(_components.code,{children:`null`}),` value does not match, including another `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` the selected result, the fallback, or `,_jsx(_components.code,{children:`null`}),` when nothing matches and no fallback is supplied.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` converting codes or categories into labels and outcomes.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Case([Priority],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"H\", \"High\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"M\", \"Medium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"L\", \"Low\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"Unknown\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Only the selected result is evaluated.`}),`\n`,_jsx(Heading,{level:`2`,id:`devicelatitude`,children:_jsx(_components.code,{children:`DeviceLatitude`})}),`\n`,_jsx(_components.p,{children:`Returns latitude from the device snapshot captured for this formula.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`DeviceLatitude()`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a workflow or form submission with a captured device location.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Numeric latitude.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` coordinate exports and location-aware submissions.`]}),`\n`]}),`\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:`DeviceLatitude()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`devicelocation`,children:_jsx(_components.code,{children:`DeviceLocation`})}),`\n`,_jsx(_components.p,{children:`Returns the complete location from the device snapshot captured for this formula.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`DeviceLocation()`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a workflow or form submission with a captured device location.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Location.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` storing a submission location and calculating distance.`]}),`\n`]}),`\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:`Distance(DeviceLocation(), [Site Location], \"km\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`devicelongitude`,children:_jsx(_components.code,{children:`DeviceLongitude`})}),`\n`,_jsx(_components.p,{children:`Returns longitude from the device snapshot captured for this formula.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`DeviceLongitude()`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a workflow or form submission with a captured device location.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Numeric longitude.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` coordinate exports and location-aware submissions.`]}),`\n`]}),`\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:`DeviceLongitude()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`devicetimestamp`,children:_jsx(_components.code,{children:`DeviceTimestamp`})}),`\n`,_jsx(_components.p,{children:`Returns the timestamp stored with the captured device snapshot.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`DeviceTimestamp()`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a workflow or form submission with a captured device snapshot.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Timestamp.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` recording when the device observation was taken.`]}),`\n`]}),`\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:`DeviceTimestamp()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`All four device functions read one consistent snapshot within an evaluation.`}),`\n`,_jsx(Heading,{level:`2`,id:`filename`,children:_jsx(_components.code,{children:`FileName`})}),`\n`,_jsx(_components.p,{children:`Returns the original name of an attached file.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`FileName(file)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a File attachment value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` attachment labels, extension checks, and integration metadata.`]}),`\n`]}),`\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:`FileName([Certificate])`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`filetype`,children:_jsx(_components.code,{children:`FileType`})}),`\n`,_jsx(_components.p,{children:`Returns the media type of an attached file.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`FileType(file)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a File attachment value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text media type, such as `,_jsx(_components.code,{children:`image/jpeg`}),` or `,_jsx(_components.code,{children:`application/pdf`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` routing, validation, and integration metadata.`]}),`\n`]}),`\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:`FileType([Certificate])`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`hash`,children:_jsx(_components.code,{children:`Hash`})}),`\n`,_jsx(_components.p,{children:`Calculates a message digest and encodes the binary result as text.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`Hash(algorithm, data, encoding)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` Text algorithm (`,_jsx(_components.code,{children:`MD5`}),`, `,_jsx(_components.code,{children:`SHA`}),`/`,_jsx(_components.code,{children:`SHA1`}),`, `,_jsx(_components.code,{children:`SHA2_256`}),`, or `,_jsx(_components.code,{children:`SHA2_512`}),`), Text data, and `,_jsx(_components.code,{children:`binhex`}),` or `,_jsx(_components.code,{children:`base64`}),` encoding.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text digest.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` third-party request formats, checksums, and deterministic identifiers.`]}),`\n`]}),`\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:`Hash(\"SHA2_256\", [Payload], \"binhex\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A plain hash does not authenticate a request. Use `,_jsx(_components.code,{children:`HMAC`}),` when the receiving API specifies a shared-secret signature.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`hmac`,children:_jsx(_components.code,{children:`HMAC`})}),`\n`,_jsx(_components.p,{children:`Calculates a keyed message authentication code and encodes the result as text.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`HMAC(algorithm, key, data, encoding)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` Text algorithm (`,_jsx(_components.code,{children:`MD5`}),`, `,_jsx(_components.code,{children:`SHA`}),`/`,_jsx(_components.code,{children:`SHA1`}),`, `,_jsx(_components.code,{children:`SHA2_256`}),`, or `,_jsx(_components.code,{children:`SHA2_512`}),`), Text secret key, Text data, and `,_jsx(_components.code,{children:`binhex`}),` or `,_jsx(_components.code,{children:`base64`}),` encoding.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text signature.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` signing third-party API requests exactly as required by that API.`]}),`\n`]}),`\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:`HMAC(\"SHA2_256\", [Signing Key], [Payload], \"base64\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Prefer `,_jsx(_components.code,{children:`SHA2_256`}),` or `,_jsx(_components.code,{children:`SHA2_512`}),` for new integrations. Use older algorithms only when the receiving service explicitly requires them.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Formulas are evaluated on the client. Never embed a reusable signing secret in a formula or client-readable field. When a key must remain secret, sign the request on a server or through a protected integration.`})}),`\n`,_jsx(Heading,{level:`2`,id:`if`,children:_jsx(_components.code,{children:`If`})}),`\n`,_jsx(_components.p,{children:`Checks conditions in order and returns the result paired with the first true condition.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`If(condition, result[, condition, result...][, elseResult])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` one or more Boolean condition/result pairs and an optional final fallback.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` the selected result, the fallback, or `,_jsx(_components.code,{children:`null`}),` when no condition is true and no fallback is supplied.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` thresholds, status labels, and conditional calculations.`]}),`\n`]}),`\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([Moisture] \u003c 10, \"Low\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` [Moisture] > 14, \"High\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"In range\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Conditions stop after the first true match, and only its result is evaluated.`}),`\n`,_jsx(Heading,{level:`2`,id:`in`,children:_jsx(_components.code,{children:`In`})}),`\n`,_jsx(_components.p,{children:`Checks whether a value equals any supplied candidate.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`In(value, candidate[, candidate...])`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a value and one or more same-type candidates tested for equality. A `,_jsx(_components.code,{children:`null`}),` value does not match, including another `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Boolean.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` compact status, category, and weekday checks.`]}),`\n`]}),`\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:`In([Status], \"Open\", \"Pending\", \"Escalated\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`parentkey`,children:_jsx(_components.code,{children:`ParentKey`})}),`\n`,_jsx(_components.p,{children:`Returns the parent record key made available while creating or populating a related record.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ParentKey()`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a workflow or session context. A parent key is available only when the flow was opened from a parent record.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` the supplied parent-key value, or `,_jsx(_components.code,{children:`null`}),` when the context has no parent key.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` populating a reference back to the record that opened the child flow.`]}),`\n`]}),`\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:`ParentKey()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:_jsx(_components.code,{children:`Response`})}),`\n`,_jsx(_components.p,{children:`Returns the body of a captured HTTP response or extracts a value from it.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`Response()`}),`, `,_jsx(_components.code,{children:`Response(path)`}),`, or `,_jsx(_components.code,{children:`Response(path, type)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` an HTTP response captured by the current integration step. Paths use dotted/indexed JSON form such as `,_jsx(_components.code,{children:`data.items[0].id`}),`, or XPath for XML.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` raw Text body with no arguments; extracted Text by default; `,_jsx(_components.code,{children:`Text`}),`, `,_jsx(_components.code,{children:`Bool`}),`/`,_jsx(_components.code,{children:`Boolean`}),`, `,_jsx(_components.code,{children:`Numeric`}),`/`,_jsx(_components.code,{children:`Number`}),`, `,_jsx(_components.code,{children:`Date`}),`, `,_jsx(_components.code,{children:`Time`}),`, or `,_jsx(_components.code,{children:`Timestamp`}),` when a type is requested. A missing JSON or simple XML path returns `,_jsx(_components.code,{children:`null`}),`; an XPath string expression with no match can return empty Text.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` reading identifiers, statuses, dates, and other values returned by an API.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Response()`})}),`\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:`Response(\"data.total\", \"Numeric\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Response(\"/result/reference\", \"Text\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`responseheader`,children:_jsx(_components.code,{children:`ResponseHeader`})}),`\n`,_jsx(_components.p,{children:`Returns values from a header on the captured HTTP response.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ResponseHeader(name)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` a captured HTTP response and Text header name. Header matching ignores case.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Text. Multiple values are joined with a comma and space; a missing header returns empty text.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` request IDs, pagination links, rate-limit metadata, and response formats.`]}),`\n`]}),`\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:`ResponseHeader(\"content-type\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`responsestatus`,children:_jsx(_components.code,{children:`ResponseStatus`})}),`\n`,_jsx(_components.p,{children:`Returns the status code of the captured HTTP response.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Syntax:`}),` `,_jsx(_components.code,{children:`ResponseStatus()`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Requires:`}),` an HTTP response captured by the current integration step.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns:`}),` Numeric HTTP status code.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Best for:`}),` success/failure routing and retry decisions.`]}),`\n`]}),`\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:`Between(ResponseStatus(), 200, 299)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Response`}),`, `,_jsx(_components.code,{children:`ResponseHeader`}),`, and `,_jsx(_components.code,{children:`ResponseStatus`}),` are only available after the current workflow has captured a response. They do not make an HTTP request themselves.`]})})]})}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":"Special functions","description":"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.","href":"/reference/special"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Between","slug":"between","depth":2,"children":[]},{"title":"Case","slug":"case","depth":2,"children":[]},{"title":"DeviceLatitude","slug":"devicelatitude","depth":2,"children":[]},{"title":"DeviceLocation","slug":"devicelocation","depth":2,"children":[]},{"title":"DeviceLongitude","slug":"devicelongitude","depth":2,"children":[]},{"title":"DeviceTimestamp","slug":"devicetimestamp","depth":2,"children":[]},{"title":"FileName","slug":"filename","depth":2,"children":[]},{"title":"FileType","slug":"filetype","depth":2,"children":[]},{"title":"Hash","slug":"hash","depth":2,"children":[]},{"title":"HMAC","slug":"hmac","depth":2,"children":[]},{"title":"If","slug":"if","depth":2,"children":[]},{"title":"In","slug":"in","depth":2,"children":[]},{"title":"ParentKey","slug":"parentkey","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"ResponseHeader","slug":"responseheader","depth":2,"children":[]},{"title":"ResponseStatus","slug":"responsestatus","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"farmtrace","siteName":"FarmTrace documentation","title":"Special functions - FarmTrace documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-07T13:14:21.459Z","gitLastModified":"2026-09-07T12:27:48.000Z","originalFileLocation":"reference/special.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=\"description\" content=\"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.\">\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=\"Special functions - FarmTrace documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FarmTrace documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.farmtrace.co.za/reference/special\">\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+reference\u0026amp;title=Special+functions\u0026amp;description=Build+decisions+and+work+with+device+snapshots%2C+files%2C+hashes%2C+parent+records%2C+and+captured+HTTP+responses.\u0026amp;theme=09ecce6343d2410fee452256\u0026amp;signature=b028f5ef595361186042ed042bd8e5ab74bd22da448fd1061ab6dc871e1359df\">\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=\"Special functions - FarmTrace documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://farmtrace.mintlify.app/_mintlify/api/og/v2?division=Formula+reference\u0026amp;title=Special+functions\u0026amp;description=Build+decisions+and+work+with+device+snapshots%2C+files%2C+hashes%2C+parent+records%2C+and+captured+HTTP+responses.\u0026amp;theme=09ecce6343d2410fee452256\u0026amp;signature=b028f5ef595361186042ed042bd8e5ab74bd22da448fd1061ab6dc871e1359df\">\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/reference/special\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/special.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/reference/special#webpage\",\"url\":\"https://docs.farmtrace.co.za/reference/special\",\"name\":\"Special functions\",\"description\":\"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.\",\"dateModified\":\"2026-09-07T12:27:48.000Z\",\"isPartOf\":{\"@id\":\"https://docs.farmtrace.co.za#website\"},\"breadcrumb\":{\"@id\":\"https://docs.farmtrace.co.za/reference/special#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.farmtrace.co.za/reference/special#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Formula reference\",\"item\":\"https://docs.farmtrace.co.za/reference/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Special functions\",\"item\":\"https://docs.farmtrace.co.za/reference/special\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.farmtrace.co.za/reference/special#article\",\"headline\":\"Special functions\",\"name\":\"Special functions\",\"description\":\"Build decisions and work with device snapshots, files, hashes, parent records, and captured HTTP responses.\",\"url\":\"https://docs.farmtrace.co.za/reference/special\",\"mainEntityOfPage\":{\"@id\":\"https://docs.farmtrace.co.za/reference/special#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","href":"/getting-started/values-and-references"},{"title":"Formula Contexts","href":"/getting-started/formula-contexts"}]},{"group":"Formula reference","icon":"book-open","pages":[{"title":"Formula index","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","description":"Create coordinates, read latitude or longitude, and calculate distance.","href":"/reference/location"},{"title":"Special functions","href":"/reference/special"},{"title":"Session functions","description":"Read the current database, table, record, user, role, browser class, and URL.","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":"Special functions - FarmTrace documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":[],"chunks":[]}