{"id":1529,"date":"2026-09-28T08:47:33","date_gmt":"2026-09-28T08:47:33","guid":{"rendered":"https:\/\/support.awardforce.com\/hc\/en-us\/6314401299343-using-formula-fields\/"},"modified":"2026-11-28T14:15:30","modified_gmt":"2026-11-28T14:15:30","slug":"6314401299343-using-formula-fields","status":"publish","type":"post","link":"https:\/\/support.awardforce.com\/hc\/en-us\/6314401299343-using-formula-fields\/","title":{"rendered":"Using formula fields"},"content":{"rendered":"<div class=\"afpro-plan\"><\/div>\n<p>Formula fields instantly perform calculations based on values entered into other fields on your entry form. To create a formula, you\u2019ll need to reference the Short titles or slugs of the fields involved.<\/p>\n<h2 id=\"h_01KAV4ZY2JCMSH4JTJFE73ZHWX\">Configure a formula field<\/h2>\n<ol>\n<li data-list-item-id=\"e6a850304027e768abd78da1a548aba33\">In the <strong>Manage<\/strong> workspace, go to <em>Entries<\/em>\n<\/li>\n<li data-list-item-id=\"eb532ec9769315fc6acaa3fc97f5f88b7\">Click <strong>Edit form<\/strong>\n<\/li>\n<li data-list-item-id=\"e12096aa577db6d35ae6983ca8c357479\">Find where you want to place your formula field, hover your cursor, and click the <strong>+<\/strong> icon<\/li>\n<li data-list-item-id=\"ef8c98ea3b2e82468f601bc315d81493d\">In the configuration tray, choose <strong>Formula<\/strong> from the <strong>Field type<\/strong> drop-down<\/li>\n<li data-list-item-id=\"e09a66663567b644f60b2a498a6859b7e\">Add a <strong>Label<\/strong> and <strong>Short title<\/strong>\n<\/li>\n<li data-list-item-id=\"e8aabe544da31241e0372196d74b7587a\">(Optional) Add <strong>Hint text<\/strong> or <strong>Help text<\/strong> for added context<\/li>\n<li data-list-item-id=\"e853ed5b3c1492a90532fa4704154a04b\">In the &#8216;Options&#8217; section, enter your formula using the functions listed below<\/li>\n<li data-list-item-id=\"e9fed724e27e5333dd66fe08e9d4a3b76\">Click <strong>Save<\/strong>\n<\/li>\n<\/ol>\n<h2 id=\"h_01GRPNRBCKM91CTJNXR4P08BB9\">Available functions<\/h2>\n<p>The formula field supports a number of different functions, many of which will be familiar if you use formulas in Excel and other spreadsheet tools. Here are some examples of what you can do.<\/p>\n<h3 id=\"h_01HAPSETWZB8M92CQW0FG10Y9C\">Number and currency fields<\/h3>\n<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 198px; width: 100%;\">\n<table style=\"border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 50%;\">\n<strong>Average<\/strong><br \/>Takes the average of the specified fields<\/td>\n<td style=\"height: 44px; width: 50%;\">average({field1},{field2},{field3},{field4})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Sum<\/strong><br \/>Sums the specified fields<\/td>\n<td style=\"height: 22px; width: 50%;\">sum({field1},{field2},{field3},{field4})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Min<\/strong><br \/>Returns the smallest number of the specified fields<\/td>\n<td style=\"height: 22px; width: 50%;\">min({field1},{field2},{field3},{field4})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Max<\/strong><br \/>Returns the largest number of the specified fields<\/td>\n<td style=\"height: 22px; width: 50%;\">max({field1},{field2},{field3},{field4})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Round<\/strong><br \/>Rounds to specified number of decimal places<\/td>\n<td style=\"height: 22px; width: 50%;\">round(number,count)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Round up<\/strong><br \/>Rounds up to specified number of decimal places<\/td>\n<td style=\"height: 22px; width: 50%;\">roundup(number,count)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Round down<\/strong><br \/>Rounds down to specified number of decimal places<\/td>\n<td style=\"height: 22px; width: 50%;\">rounddown(number,count)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u00a0<\/p>\n<h3 id=\"h_01HAPSETX0AGHAGJ82H8PZAFFM\">Strings<\/h3>\n<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 110px; width: 100%;\">\n<table style=\"border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 50%;\">\n<strong>Concatenate<\/strong><br \/>Combines several text strings into one string<\/td>\n<td style=\"height: 44px; width: 50%;\">concatenate({field1},{field2},&#8230;{fieldn})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Exact<\/strong><br \/>Returns true if both strings are exactly the same<\/td>\n<td style=\"height: 22px; width: 50%;\">exact({field1},{field2})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Left<\/strong><br \/>Extracts a given number of characters from the left side of a text string.<\/td>\n<td style=\"height: 22px; width: 50%;\">left({field},4)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Lower<\/strong><br \/>Converts the text to lowercase<\/td>\n<td style=\"height: 22px; width: 50%;\">lower({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Mid<\/strong><br \/>Returns a substring of a given length starting from a specific position<\/td>\n<td style=\"height: 22px; width: 50%;\">mid({field},start_position,length)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Proper<\/strong><br \/>Capitalises the first word of a string<\/td>\n<td style=\"height: 22px; width: 50%;\">proper({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Replace<\/strong><br \/>Replaces a substring of a given string<\/td>\n<td style=\"height: 22px; width: 50%;\">replace({field},start_position,length,&#8221;new string&#8221;)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Right<\/strong><br \/>Extracts a given number of characters from the right side of a text string.<br \/>\u00a0<\/td>\n<td style=\"height: 22px; width: 50%;\">right({field},4)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u00a0<\/p>\n<h3 id=\"h_01HAPSETX0NJA1JHZ52PXRG070\">Dates<\/h3>\n<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 240px; width: 100%;\">\n<table style=\"border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 50%;\">\n<strong>Today<\/strong><br \/>Returns today&#8217;s date<\/td>\n<td style=\"height: 44px; width: 50%;\">today()\u00a0<br \/>To format the date use text(today(),&#8221;MM\/DD\/YYYY&#8221;)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Days<\/strong><br \/>Calculates the difference between two date values<\/td>\n<td style=\"height: 22px; width: 50%;\">days({field1},{field2})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Month<\/strong><br \/>Returns the month for a date value<\/td>\n<td style=\"height: 22px; width: 50%;\">month({field1})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Year<\/strong><br \/>Returns the year for a date value<\/td>\n<td style=\"height: 22px; width: 50%;\">year({field1})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Day<\/strong><br \/>Returns the day for a date value<\/td>\n<td style=\"height: 22px; width: 50%;\">day({field1},{field2})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Edate<\/strong><br \/>Shifts the date by the given number of months<\/td>\n<td style=\"height: 22px; width: 50%;\">edate({date},months)<br \/>To format the date use text(edate({start},3),&#8221;dd\/mm\/yyyy&#8221;)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Hour<\/strong><br \/>Returns the hour for a given time<\/td>\n<td style=\"height: 22px; width: 50%;\">hour({time})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Now<\/strong><br \/>The current date and time<\/td>\n<td style=\"height: 22px; width: 50%;\">now()<br \/>To format use:<br \/>text(now(),&#8221;dd\/mm\/yy hh:mm:ss&#8221;)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 50%;\">\n<strong>Weekday<\/strong><br \/>Returns the number that corresponds to a day of the week<\/td>\n<td style=\"height: 22px; width: 50%;\">weekday({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 20px; width: 50%;\">\n<strong>Week number<\/strong><br \/>Returns the number that corresponds to the week of the year<\/td>\n<td style=\"height: 20px; width: 50%;\">weeknum({field})<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">\n<p><strong>Age<\/strong><\/p>\n<p>Returns the age for a given date<\/p>\n<\/td>\n<td style=\"width: 50%;\">rounddown(days(today(),({DOB}))\/365,0)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">\n<p><strong>Countdown<\/strong><\/p>\n<p>Calculates the days and hours until a given date and time<\/p>\n<\/td>\n<td style=\"width: 50%;\">days({Date 2}, {Date 1}) &amp; &#8221; days, &#8221; &amp; hour({Date 2}) &#8211; hour({Date 1}) &amp; &#8221; hours&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u00a0<\/p>\n<h3 id=\"h_01HAPSETX0YM2AVMJQ7VRJJ545\">Engineering<\/h3>\n<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 220px; width: 100%;\">\n<table style=\"border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 49.7143%;\">\n<strong>bin2dec<\/strong><br \/>Converts a binary number to decimal<\/td>\n<td style=\"height: 44px; width: 50.2857%;\">bin2dec({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 49.7143%;\">\n<strong>bin2hex<\/strong><br \/>Converts a binary number to hexadecimal<\/td>\n<td style=\"height: 22px; width: 50.2857%;\">bin2hex({field})<\/td>\n<\/tr>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 49.7143%;\">\n<strong>dec2bin<\/strong><br \/>Converts a decimal number to binary<\/td>\n<td style=\"height: 44px; width: 50.2857%;\">dec2bin({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 49.7143%;\">\n<strong>dec2hex<\/strong><br \/>Converts a decimal number to hexadecimal<\/td>\n<td style=\"height: 22px; width: 50.2857%;\">dec2hex({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 49.7143%;\">\n<strong>delta<\/strong><br \/>Returns true(1) if both numbers are equal otherwise false(0)<\/td>\n<td style=\"height: 22px; width: 50.2857%;\">delta({field1},{field2})<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u00a0<\/p>\n<h3 id=\"h_01HAPSETX0EMM3CXZJ2EMSAJ4Z\">Information<\/h3>\n<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 220px; width: 100%;\">\n<table style=\"border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 49.7143%;\">\n<strong>isnumber<\/strong><br \/>Returns true if the field contains a number<\/td>\n<td style=\"height: 44px; width: 50.2857%;\">isnumber({field1})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 49.7143%;\">\n<strong>iseven<\/strong><br \/>Returns true if the field contains an even number<\/td>\n<td style=\"height: 22px; width: 50.2857%;\">iseven({field})<\/td>\n<\/tr>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 49.7143%;\">\n<strong>isodd<\/strong><br \/>Returns true if the field contains an odd number<\/td>\n<td style=\"height: 44px; width: 50.2857%;\">isodd({field})<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 49.7143%;\">\n<strong>istext<\/strong><br \/>Returns true if the field contains text<\/td>\n<td style=\"height: 22px; width: 50.2857%;\">istext({field})<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u00a0<\/p>\n<h3 id=\"h_01HAPSETX091T32422FXC9RAQ8\">Logical<\/h3>\n<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 220px; width: 100%;\">\n<table style=\"border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 49.7143%;\">\n<strong>if<\/strong><br \/>If\/then test<\/td>\n<td style=\"height: 44px; width: 50.2857%;\">if({field1}&gt;1000,&#8221;then value1&#8243;, &#8220;otherwise value2&#8221;)<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 49.7143%;\">\n<strong>and<\/strong><br \/>Returns true if all arguments are true<\/td>\n<td style=\"height: 22px; width: 50.2857%;\">and({num1}=3, {num2}=3)<\/td>\n<\/tr>\n<tr style=\"height: 44px;\">\n<td style=\"height: 44px; width: 49.7143%;\">\n<strong>or<\/strong><br \/>Returns true if at least one argument is true<\/td>\n<td style=\"height: 44px; width: 50.2857%;\">or({num1}=3, {num2}=3)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"h_01HAPSETWZPJSSHBA92K4B7Z86\">Example<\/h2>\n<p>If you want to calculate the year-on-year growth in revenue for two fields with short titles &#8220;2020&#8221; and &#8220;2021&#8221; you would reference each field as {2020} and {2021} in your formula. Here&#8217;s how it will look:<\/p>\n<pre class=\"wysiwyg-text-align-center wysiwyg-code-block\"><code class=\"language-auto\">({2021}-{2020})\/{2020}*100<\/code><\/pre>\n<p>To round the result to two decimal places you can use the round function as follows:<\/p>\n<pre class=\"wysiwyg-text-align-center wysiwyg-code-block\"><code class=\"language-auto\">round(({2021}-{2020})\/{2020}*100,2)<\/code><\/pre>\n<h2 id=\"h_01HAPSETX0NXXVN3P3ARJMT0V0\">Good to know<\/h2>\n<ul>\n<li data-list-item-id=\"e678f3455d5b03ff42776fa34e3f01494\">Formulas must be enclosed in curly braces: {}.<\/li>\n<li data-list-item-id=\"ead9366019379fc3e6ff8d0796bd1f9d7\">Formulas are calculated client-side, meaning the calculation happens in the user\u2019s browser. Because of this, the formula field and any fields it references must be visible to the user viewing the page.<\/li>\n<li data-list-item-id=\"eeddad1db075a808520ae1a2dc862430f\">Formula fields support up to 120 nested functions.<\/li>\n<li data-list-item-id=\"e0c360f7950778cc064e607f582785b7f\">All field types are supported except table fields, content fields, and other formula fields.<\/li>\n<li data-list-item-id=\"e9e09c4d7fdc42bbed8cba23071c973ba\">When a radio button, checkbox list, or drop-down field has separate labels and values configured (for example, a label of &#8220;Colours&#8221; and a value of &#8220;A123&#8221;), you can return the underlying value in a formula field by simply entering in the field&#8217;s slug. This is useful when you want participants to select from readable text options while the corresponding codes are used internally.<\/li>\n<li data-list-item-id=\"e405190194a2271737af9a39a5af8307a\">There is no need to add an equals sign at the start of a formula.<\/li>\n<li data-list-item-id=\"e412f4b94a10f3beff74e305fae71f607\">When referencing a field in a formula, you can use either the field&#8217;s short title or its slug. The formula is saved referencing the slug, so if you later update a field&#8217;s short title, existing formulas will not break.<\/li>\n<li data-list-item-id=\"ec540df7e12ec30ee24296eae847c3e6c\">Calculated values are saved to the entry when the entry is saved. This allows formula fields to be added as columns in views such as <em>Entries<\/em> in the <strong>Manage<\/strong> workspace.<\/li>\n<li data-list-item-id=\"e5a84d27b82ca7c78861489cf0c01c672\">Updating a formula after entries already exist will automatically recalculate all stored values.<\/li>\n<\/ul>\n<p>To learn about other field types supported by Award Force, check out our guide: <a href=\"https:\/\/support.awardforce.com\/hc\/en-us\/articles\/210170686\" target=\"_self\">Field types overview<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Formula fields instantly perform calculations based on values entered into other fields on your entry form. To create a formula, you\u2019ll need to reference the Short titles or slugs of the fields involved. Configure a formula field In the Manage workspace, go to Entries Click Edit form Find where you want to place your formula [&hellip;]<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1224,1236],"tags":[1805,1639,2136,1803],"class_list":["post-1529","post","type-post","status-publish","format-standard","hentry","category-4411269011855-configuring-the-entry-form","category-4411269144207-field-types-and-their-uses","tag-calculation","tag-field","tag-formula","tag-sum"],"_links":{"self":[{"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/posts\/1529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/comments?post=1529"}],"version-history":[{"count":1,"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/posts\/1529\/revisions"}],"predecessor-version":[{"id":1636,"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/posts\/1529\/revisions\/1636"}],"wp:attachment":[{"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/media?parent=1529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/categories?post=1529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.awardforce.com\/hc\/en-us\/wp-json\/wp\/v2\/tags?post=1529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}