---
category: [Administration & Integrations, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions, Platform and Product Extensions/Workday Extend, Platform and Product Extensions/Integration]
keyword: [Extend, Model Components, Extend Business Objects, MCBO, Model Component Business Objects, Business Objects, Model BO]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Reference: Derived Fields
layout: subsection
---

## <a id="section_N1002B_N10028_N10001"></a>Field Types

Extend supports these field types for derived fields:

-   BOOLEAN
-   DATE
-   DECIMAL
-   INTEGER
-   TEXT


## <a id="section_gkd_pbl_lsb"></a>Operations

Extend supports these operations for derived fields:

<table><thead><tr><th>Operation Type</th><th>Example</th></tr></thead><tbody><tr><td>Arithmetic operations.</td><td><code>"expression": "(amount + amount * 2) / 12"</code></td></tr><tr><td>Basic Elvis operation.</td><td><code>"expression": "isDonationRank1 ? 'Large Donation' : (isDonationRank2 ? 'Medium Donation' : 'Small Donation')"</code></td></tr><tr><td>Equality check.</td><td><code>"expression": "name == 'Workday Charity'"</code></td></tr><tr><td>Logical operations (&&, ||, !).</td><td><code>"expression": "maxDonation > 200 && maxDonation <= 1000"</code></td></tr><tr><td>Support for parentheses.</td><td><code>"expression": "amount >= 1000 ? 'Large Donation' : (amount >= 200 ? 'Medium Donation' : 'Small Donation')"</code></td></tr><tr><td>Text concatenation.</td><td><code>"expression": "'Charity: ' + name + ' - ' + description"</code></td></tr><tr><td>Value comparisons (==, !=, >, >=, <, <=).</td><td><code>"expression": "maxDonation <= 200"</code></td></tr></tbody></table><br/>

## <a id="section_hpz_qbl_lsb"></a>Built-In Functions

Extend supports these built-in functions for derived fields:

<table><thead><tr><th>Function</th><th>Allowed Calling Type</th><th>Return Type</th><th>Example</th><th>Notes</th></tr></thead><tbody><tr><td><code>toString()</code></td><td>DATE <p>DECIMAL</p> <p>INTEGER</p></td><td>TEXT</td><td><code>integerField.toString()</code> <p><code>(1 + 2).toString()</code></p> <p><code>dateField.toString()</code></p></td><td> </td></tr><tr><td><code>length()</code></td><td>TEXT</td><td>DECIMAL <p>INTEGER</p></td><td><code>textField.length()</code></td><td> </td></tr><tr><td><code>toNumber()</code></td><td>TEXT</td><td>DECIMAL <p>INTEGER</p></td><td><code>textField.toNumber()</code></td><td>The function returns a value of zero when the text field doesn't convert into a number.</td></tr><tr><td><code>toDate()</code></td><td>TEXT</td><td>DATE</td><td><code>textField.toDate()</code> <p><code>'2021 09 01'.toDate()</code></p></td><td>The function returns the Workday null date when the text field doesn't convert into a date. The Workday null date displays an empty field in a report.</td></tr><tr><td><code>lowerCase()</code> <p><code>upperCase()</code></p></td><td>TEXT</td><td>TEXT</td><td><code>textField.lowerCase()</code> <p><code>textField.upperCase()</code></p></td><td> </td></tr><tr><td><code>toYear()</code> <p><code>toMonth()</code></p> <p><code>toDay()</code></p> <p><code>toHour()</code></p></td><td>DATE</td><td>TEXT</td><td><code>dateField.toYear()</code> <p><code>dateField.toMonth()</code></p> <p><code>dateField.toDay()</code></p> <p><code>dateField.toHour()</code></p></td><td>The function returns the first of the month, the day, or the hour when the date field has a lower precision than the called function. <p>Example: You enter <code>yourDateField</code> with <code>Year</code> precision and content of <code>2021</code>.</p><ul><li><code>yourDateField.toMonth()</code> returns a value of <code>1</code>.
</li><li><code>yourDateField.toDay()</code> returns a value of <code>1</code>.
</li><li><code>yourDateField.toHour()</code> returns a value of <code>0</code>.
</li></ul></td></tr></tbody></table><br/>

You can chain function calls together as long as you meet the field type requirement. Example: You can use `dateField.toString()` to return text, while the `length()` function accepts text as the calling type. You can chain these function calls together as `dateField.toString().length()`.

### Related Information

[Concept: Derived Fields](/wcp_docs/nuk1625697865548.html)

[Tutorial: Model Components: Derived Fields](https://wd5.myworkday.com/workday/learning/course/dfa49d237c9d016f69e98f56e0023c71?type=9882927d138b100019b928e75843018d)

[Example: Add Derived Fields to Business Objects](/wcp_docs/yyj1643753159384.html)

