{"id":84,"date":"2010-12-06T08:14:44","date_gmt":"2010-12-06T14:14:44","guid":{"rendered":"http:\/\/www.teamdesk.net\/blog\/2010\/12\/extensions-to-formula-language-and-filters\/"},"modified":"2010-12-06T08:14:44","modified_gmt":"2010-12-06T14:14:44","slug":"extensions-to-formula-language-and-filters","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/","title":{"rendered":"Extensions to formula language and filters"},"content":{"rendered":"<p><strong>1. Literals<\/strong><\/p>\n<p>Formula language has been extended to support date, time, timestamp and duration literals.<\/p>\n<p>Date, time and timestamp literals are enclosed in pound signs.<\/p>\n<p>To specify date constant write the date separated by dashes in year-month-day format, for example <strong>#2010-12-06#<\/strong>.<\/p>\n<p>Time literals use 24 hour clock, with optional seconds, for example <strong>#9:59# o<\/strong>r <strong>#23:55:57#<\/strong>.<\/p>\n<p>Timestamp literals combine the format of of the date and time literals, for example <strong>#2010-12-06 23:59#<\/strong><\/p>\n<p>Duration literals are decimal numbers followed by the unit: <strong>d<\/strong> for days, <strong>h<\/strong> for hours, <strong>m<\/strong> for minutes or <strong>s<\/strong> for seconds. For example <strong>0.25d<\/strong>, <strong>6h<\/strong>, <strong>360m<\/strong> or <strong>21600s<\/strong> represent the same value \u2013 six hours.<\/p>\n<p>Date(), Time() and other functions are still available to allow constructing values from variable parts.<\/p>\n<p><strong>2. Role References<\/strong><\/p>\n<p>To check whether the user is a member of a certain role you are probably using the construct such as <strong>Role() = &quot;Project Manager&quot;<\/strong>. The drawback of this approach is that if you eventually modify the name of the role you&#8217;ll need to update all the formulas to reflect new name.<\/p>\n<p>Now you can check whether the &quot;current user&quot; is a member of a certain role by specifying role name in square brackets \u2013 the syntax is identical to column or variable reference. The example above could be rewritten as<strong>[Project Manager]<\/strong>. We are keeping track of such a constructs and when the role name changes, all formulas using role check are auto-updated.<\/p>\n<p><strong>3. Filter Editor<\/strong><\/p>\n<p>Filter editor now supports both literals and role references. Wizard mode understands old functional format of value specifications and translates values to a literal format on save.<\/p>\n<p><strong>4. Formula Viewer <\/strong><\/p>\n<p>Formula viewer decorates column\/variable\/role references as links to corresponding setup pages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Literals Formula language has been extended to support date, time, timestamp and duration literals. Date, time and timestamp literals are enclosed in pound signs. To specify date constant write the date separated by dashes in year-month-day format, for example #2010-12-06#. Time literals use 24 hour clock, with optional seconds, for example #9:59# or #23:55:57#. [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-whats-new"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Extensions to formula language and filters - TeamDesk Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extensions to formula language and filters - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"1. Literals Formula language has been extended to support date, time, timestamp and duration literals. Date, time and timestamp literals are enclosed in pound signs. To specify date constant write the date separated by dashes in year-month-day format, for example #2010-12-06#. Time literals use 24 hour clock, with optional seconds, for example #9:59# or #23:55:57#. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2010-12-06T14:14:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2024\/01\/logo_og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"315\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Kirill Bondar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirill Bondar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/\"},\"author\":{\"name\":\"Kirill Bondar\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"headline\":\"Extensions to formula language and filters\",\"datePublished\":\"2010-12-06T14:14:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/\"},\"wordCount\":285,\"commentCount\":1,\"articleSection\":[\"What's New\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/\",\"name\":\"Extensions to formula language and filters - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"datePublished\":\"2010-12-06T14:14:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/extensions-to-formula-language-and-filters\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extensions to formula language and filters\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\",\"name\":\"Kirill Bondar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"caption\":\"Kirill Bondar\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/kirill-bondar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extensions to formula language and filters - TeamDesk Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/","og_locale":"en_US","og_type":"article","og_title":"Extensions to formula language and filters - TeamDesk Blog","og_description":"1. Literals Formula language has been extended to support date, time, timestamp and duration literals. Date, time and timestamp literals are enclosed in pound signs. To specify date constant write the date separated by dashes in year-month-day format, for example #2010-12-06#. Time literals use 24 hour clock, with optional seconds, for example #9:59# or #23:55:57#. [&hellip;]","og_url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/","og_site_name":"TeamDesk Blog","article_published_time":"2010-12-06T14:14:44+00:00","og_image":[{"width":600,"height":315,"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2024\/01\/logo_og.png","type":"image\/png"}],"author":"Kirill Bondar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirill Bondar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/"},"author":{"name":"Kirill Bondar","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"headline":"Extensions to formula language and filters","datePublished":"2010-12-06T14:14:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/"},"wordCount":285,"commentCount":1,"articleSection":["What's New"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/","url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/","name":"Extensions to formula language and filters - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"datePublished":"2010-12-06T14:14:44+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/extensions-to-formula-language-and-filters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Extensions to formula language and filters"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2","name":"Kirill Bondar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","caption":"Kirill Bondar"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/kirill-bondar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":0,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}