2.0.calculated Fields

Download as pdf or txt
Download as pdf or txt
You are on page 1of 178

CALCULATED FIELDS

COURSE MANUAL AND ACTIVITY GUIDE

11
1
CALCULATED FIELDS FOR WORKDAY

DESCRIPTION

Calculated fields allow users to perform simple arithmetic, date calculations, text concatenation, logical
expressions, retrieval of related data, formatting and transformations of existing data. Calculated fields can
be based on delivered Workday fields, other calculated fields, or available custom fields. You can use
calculated fields in reporting (e.g. prompts, filters), business processes (e.g. condition steps), integrations,
scheduling recurring processes, and other areas within Workday.

GOAL & OBJECTIVES


Through hands-on activities and demonstrations learn how Calculated Fields can enable rich, customized
reports without coding or programming, using simple field configurations. For ease of testing in this class,
we will use Calculated Fields in custom reports, recognizing that Calculated Fields are not limited to just
reports.
 Calculated Field Concepts & Security
 Configuring and Testing Available Calculated Field Functions
 Managing Calculated Fields, Reports & Resources

AGENDA
 Why Calculated Fields?

 Overview of Calculated Fields

 Calculated Field Functions & Activities

Day 1 Day 2 Day 3

Format Date Lookup Range Band Lookup Value as of Date


Increment/Decrement Date Lookup Date Rollup Prompt for Value
Date Difference Substring Text Arithmetic Calculation
Build Date Concatenate Text Count Related Instances
True/False Condition Format Text Sum Related Instances
Convert Currency Text Length Aggregate Related Instances
Text Constants (Global CFs) Format Number Lookup Organizational Roles
Evaluate Expression Convert Text to Number Lookup Organization
Workshops Lookup Related Value Lookup Hierarchy
Extract Single Instance Lookup Hierarchy Rollup
Extract Multi Instance Lookup Translated Value
Workshops Workshops

22
2
CALCULATED FIELDS

Calculated Fields are new field definitions that you can configure that allow you to manipulate, transform,
retrieve and derive values based on existing data. As you will see in this course, you can use calculated
fields to, for example:

 Perform date calculations and formatting


 Perform simple math calculations
 Manipulate text with concatenate, substring and formatting functions
 Convert currency fields
 Derive range bands from numeric or currency fields
 Determine if a condition is true or not
 Drilldown and lookup levels and values in hierarchies and organizations
 Sum, count, aggregate information across related instances
 Lookup values in related objects

Key concepts include:


1. Calculated Fields can be created as system-wide or report-specific
2. Value is determined at run-time
3. Must be associated with a business object

SYSTEM-WIDE VS. REPORT SPECIFIC CALCULATED FIELDS


Calculated Fields can be defined system-wide in your tenant or report-specific where they are only available
within a single report. We will explore both types in this class.

Some key benefits of using system-wide calculated fields are:


 They are available throughout Workday, not just in reports.
 System-wide calculated fields are available for use in any report, not just a single report definition.
 There may already be a system-wide calculated field available that suits the needs of a particular report
definition.
 All authorized users of the system-wide calculated field can see and use the calculated field, and use it
where appropriate.
 However, there are cases where the use of a report-specific calculated field might be advantageous to a
specific report definition.

CALCULATED AT RUNTIME

Calculated fields determine the value for the field at the time that it is used. The value can be calculated
based on other Workday-delivered fields, other calculated fields, and/or available custom fields. You can use
arithmetic, or text, date, and currency manipulations. You can also create Boolean fields (yes/no), transform
data and traverse Workday’s object relationships to retrieve other field values. Calculated fields are resolved
at run time because the values of the other fields used to determine the value of the calculated field can vary
from day to day (or, moment to moment). These fields and objects instances values are retrieved as of the
moment you run the report or execute the condition rule that uses the calculated field.

33
3
ASSOCIATED WITH BUSINESS OBJECT

Calculated fields are associated with a business object (BO).This BO is referred to as the Calculated Field
Business Object (CFBO). The CFBO controls the fields are available when creating the calculated field. There
are calculated field function types that enable you to retrieve values from related business objects (RBOs).
Any calculated fields you create for a business object appear and behave just like any other Workday-
delivered fields for the business object. The business object on which you base your calculated field (CFBO)
also controls when the calculated field appears in prompts and reports.

Note: Calculated fields associated with the Worker business object are available to both data sources that
access the Worker business object and data sources that access the Employee business object . However,
calculated fields associated with the Employee business object are available only to data sources that access
the Employee business object. To provide maximum flexibility, where possible, associate calculated fields with
the Worker business object.

GLOBAL CALCULATED FIELDS

Global calculated fields are associated to the Global business object. The Global business object contains the
fields that are global in nature, which can be both Workday delivered fields and calculated fields you define.
Fields associated with the Global business object are available for use with any business object and are visible
to all users. They can represent constants such as '1', '23', 'single space', 'is true', and 'USD'. They can also
represent data that varies over time such as 'today', 'last day of this month', and 'current user'. You can
create additional global fields by selecting “Global” as the business object when you create a calculated field.
Global fields are displayed in their own “Global” field prompt.

44
4
WHO CAN CREATE CALCULATED FIELDS?

To create, edit, or delete system-wide calculated fields, you must be assigned to a security group that is
authorized for the Custom Field Management domain. To ensure control and consistency, and to avoid
duplicate field definitions, access to that domain should be limited to key individuals in your organization.
Security Domain: Custom Field Management (for system-wide Calculated Fields)
Sub-domain: Private Calculated Fields Management (for Report-specific Calculated Fields)
Sample Access: Setup Administrator, Implementer, Report Administrator & Report Writer

55
5
WHO CAN USE AND SEE VALUES FOR A CALCULATED FIELD?

Once defined, only users with access to the underlying secured fields can access and see the values for
calculated fields. Underlying secured fields are Workday delivered report fields or Custom Fields. Workday
delivered report fields and Custom Fields are secured to domains. Users must have access to the domain(s)
for these underlying fields in order to have access to any calculated fields that are based on them. Security
access to a calculated field definition is therefore ‘derived’ from its underlying secured fields.

You can view the security for a calculated field to see the underlying secured fields and configured security.
Using related actions, Calculated Field > View Security Groups you can see the underlying secured fields
and configured security groups. To determine which domains/domain security policies can be configured,
select Security>View Security to see the underlying domains/domain security policies.

66
6
DEMO – WHO CAN SEE A CALCULATED FIELD DEFINITION?
WHO CAN USE A CALCULATED FIELD AND SEE THE VALUE?

This demonstration will show how system-wide calculated field definitions are visible by default and can be
edited by any user that has access to creating calculated fields, regardless of ownership. It will also show
how you can create any calculated field definition using any field regardless of security, however when it
comes to then using the calculated field in, for example, a report or rule, you can only use and see calculated
fields that you have access to.

TASK 1 - CREATE A CALCULATED FIELD

1. Login as Teresa Serrano (tserrano)

2. Run the Create Calculated Field task

a. Calculated Field Name: Test CF

b. Business Object: Worker

c. Function: Format Text

3. Click OK

4. Configure the Calculation tab:

a. Source field: Gender

b. Options: Upper case

5. Click OK to save.

TASK 2 - USE THE CALCULATED FIELD IN A REPORT

1. Still as Teresa, run the Create Custom Report task

a. Report Name: Test Rpt

b. Report Type: Advanced

c. Data Source: All Workers

2. Click OK

3. Under the Columns tab, try adding the following fields:

a. Gender

77
7
i. See how Teresa does not have access to the Gender Report Field

b. Test CF

i. See how Teresa does not have access to the calculated field she created in Task
1. Why? Because she does not have access to the underlying secured field:
Gender.

Note: you would typically have access to the underlying fields to then test your
calculated field, but this demo is to show you how you can DEFINE any calculated field
definition, even if you do not have access to the underlying fields to then use and test
the calculated field in a report to see the values.

TASK 3 - EDIT A CALCULATED FIELD

1. Login as Logan McNeil (lmcneil)

2. Run the Edit Calc Field task

3. Bring up Teresa’s calculated field: Test CF

4. Edit the Options to be ‘lower case’

5. Click OK

See how Logan was able to edit Teresa’s calculated field definition. Any user with access to the
domain: Custom Field Management can create/edit/view/delete any system-wide calculated field
definition in the tenant.

TASK 4 - VIEW AUDIT TRAIL OF CALCULATED FIELD

1. As Logan, use related actions off the Test CF calculated field to view the audit trail. See how you
can see the changes to the definition.

TASK 5 – DELETE A CALCULATED FIELD

1. Since the Test CF calculated field is not being used anywhere, Logan can delete the definition.

2. Using related actions, delete the calculated field definition.

(End of Demo)

88
8
CALCULATED FIELDS – TASKS & REPORTS

MAINTAIN CALCULATED FIELDS REPORT

You can use the Maintain Calculated Fields report as a control center for tasks related to system-wide
calculated fields. With this report you can:
 View all the calculated fields your company has defined in Workday.
 Create a new calculated field using the Add New button at the bottom of the report.
 Edit a calculated field using the Edit button, or by using Calculated Field > Edit from the related
actions menu for the given Calculated field.
 Delete a calculated field using the Delete button, or by using the Calculated Field > Delete option
from the related actions menu for the given calculated field. Calculated fields already in use, such as
in a custom report, cannot be deleted until all references within Workday have been removed for that
calculated field. To determine if a calculated field is being used, view the Where Used tab in the
calculated field definition.
 Copy a field using Calculated Field > Copy from the related actions menu.
 Check all the security groups required to access this field with Calculated Field > View Security
Groups from the related actions menu. The groups listed are based on the security of all the Workday
delivered (and/or Custom) fields used in the calculation.

You can also directly run tasks such as edit, create, and delete calculated fields from the search box using:
Create Calculated Field
Edit Calculated Field
Delete Calculated Fields

Note: Don’t be confused by other tasks used to define Payroll calculations (e.g. Create xxx Calculation, Edit
xxx Calculation, Delete Calculation). Use the search prefix option cf: to just search Calculated Field definitions
in your tenant.

Other helpful reports to see existing report fields in the tenant (either Workday Delivered.

Calculated Fields or Custom Fields) are: Report Fields and Business Object Details report.
All Calculated Fields is another delivered report that can show you system-wide and report

99
9
specific calculated fields on a given business object and where they’re being used.

AVAILABLE CALCULATED FIELDS FUNCTIONS AND FIELD TYPES

The following is an alphabetical list of the available Workday Calculated Field Functions.

1. Aggregate Related Instances


2. Arithmetic Calculation
3. Build Date
4. Concatenate Text
5. Convert Currency
6. Convert Text to Number
7. Count Related Instances
8. Date Constant
9. Date Difference
10. Evaluate Expression
11. Extract Multi-Instance
12. Extract Single Instance
13. Format Date
14. Format Number
15. Format Text
16. Increment or Decrement Date
17. Lookup Date Rollup
18. Lookup Hierarchy
19. Lookup Hierarchy Rollup
20. Lookup Organization
21. Lookup Organizational Roles
22. Lookup Range Band
23. Lookup Related Value
24. Lookup Translated Value
25. Lookup Value As Of Date
26. Numeric Constant
27. Prompt for Value
28. Substring Text
29. Sum Related Instances
30. Text Constant
31. Text Length
32. True/False Condition

Be sure to explore other examples and use cases to better see the potential applications of
calculated fields in Workday. Examples can be found in this guide, in your training tenants,
and potentially in your own implementation tenants, to name a few.

101
10
0
Calculated fields can be date fields, numeric fields, currency fields, text fields, Boolean fields, single instance
fields, and multi-instance fields. The calculation function determines the possible field types that can be
returned. By having different field types returned, further calculations can be done off of calculated fields
themselves.

111
11
1
ACTIVITY 1A – HOW CAN YOU SEE EXISTING
CALCULATED FIELDS IN THE TENANT?

Sign in as Logan McNeil (lmcneil)

TASK 1 – RUN THE MAINTAIN CALCULATED FIELDS REPORT


1. From the search box, search for and run Maintain Calculated Fields

2. Using the filter icon , filter on the Business Object column and choose “Worker”.

a. See all the existing system-wide calculated fields defined in the tenant for the Worker
business object.

b. Now also filter on the Function column and choose “True/False Condition” to see
calculated fields of this function for the Worker business object.

c. Click on the calculated field: 45 Years or Older to view the definition. (Tip: use a right
mouse click on the field link and select “see in new tab” (this option may vary depending
on your browser)

d. Note the Calculation tab and the condition configured.

121
12
2
e. Click on the Additional Information tab and see how this calculated field is described
and categorized.

f. Click on the Where Used tab to see where this calculated field is being used.

3. Re-run (or go back to) the Maintain Calculated Fields report and try filtering the output on
another business object: “Journal Line”

a. See all the existing system-wide calculated fields defined in the tenant for the Journal
Line business object.

b. Scroll down and find the calculated field: Fiscal Period

c. Click on the calculated field: Fiscal Period to view the definition under the Calculation
tab. This calculated field is taking the Accounting Date on the Journal Line and
formatting it as a Fiscal Period - Year using the Standard Corporate Schedule.

d. Click on the Additional Information tab and see how this calculated field is
documented.

e. Click on the Where Used tab to see where this calculated field is being used.

TASK 2 – MORE RESOURCES TO TRACK EXISTING FIELDS IN TENANT

Besides the Maintain Calculated Fields report, there are other key reports and resources to show
you existing fields in the tenant.

1. From the search box, run the All Calculated Fields report, choose business object: Expense
Report and select the Include Report Specific Calculated Fields checkbox.

2. See all system-wide and report specific calculated fields for that object and where they are
currently being used.

131
13
3
3. From the search box, run the Business Object Details report and select the business object:
Expense Report. See how under the first tab, Fields, you can see not only Workday delivered,
but also any calculated fields or even any custom fields (if applicable) defined on this business
object

4. Now, try running the Report Fields report. See all report fields, delivered, custom and
calculated in the tenant!

*** It is important to leverage existing resources to know what fields already exist in
the tenant before creating new calculated fields. ***

(End of Activity)

141
14
4
ACTIVITY 1B – COPY A CUSTOM REPORT TO USE FOR
TESTING CALCULATED FIELDS

TASK 1 COPY A CUSTOM REPORT FOR OUR TESTING

1. From the search box, search for and run the Copy Custom Report task.

2. Select the report to copy as: WDINST CF Employee Report.

3. Name the copy: WICT CF Employee Report.

4. Click OK.

5. Review the Columns, Sort, Filter, and configurations.

 Keep in mind, that using the All Workers data source and then filtering down to just Employees is
not the most efficient report design for performance. It is always recommended that you select
the most targeted data source from the start. In our example, All Active Employees or
Employees by Organization could be more efficient choices.

6. Click OK to save the report and Run the report.

7. We will use this report as a basis for testing our calculated fields.

(End of Activity)

151
15
5
CREATING A CALCULATE D FIELD

To create a system-wide Calculated Field, run the Create Calculated Field task. You will then be prompted
to enter a Field Name, select the Business Object (CFBO) and Function desired.

The CFBO choice determines two major outcomes:

1. What fields will be available within the calculation!


o If you choose the Employee Object then all Class Report Fields related to Employee will be
available (of type)
o Along with GLOBAL fields
2. Controls where the new Calculated Field will be available.
o If you chose the Employee Object, then your calculated field will be available as a field off of
the employee object within the report writer

CALCULATION TAB

Next, specify the parameters required for the function under the Calculation tab. The parameters required
will vary depending on the Calculated field function selected.

161
16
6
ADDITIONAL INFORMATION TAB

Specify Additional Information as needed to help organize, document, locate, and reference your
Calculated Field.

Category

Categorizing your calculated fields can help users locate calculated fields by category in field prompts.

171
17
7
“Uncategorized” is the default. You can configure more than one category as needed.

181
18
8
Authorized Usage

This field allows customers to restrict the areas within Workday where the calculated field will be
displayed in prompts. “Default Areas” is the default and should be used unless there is a compelling reason
not to. Benefits Eligibility, Calculation Engine (Payroll/Absence) and Compensation Eligibility should, for
example, be explicitly added in addition to Default Areas if needed.

Intermediate Calculation

This checkbox drives whether the calculated field will show in main field prompts or not. If checked as
intermediate, it will NOT show in main prompts, and if not checked as intermediate, it will show in main field
prompts.

There are occasions where you need to define a calculated field only to be used in another calculated field.
The calculated field would never be used on its own, and was only needed as an intermediate calculated field
to get the eventual end-use calculated field. These intermediate calculated fields can be ‘not shown’ in main
field prompts, and instead can be found under “Other > Intermediate Calculated Fields” in field prompts.

Intermediate calculated fields are still searchable and usable. This checkbox only dictates
where the field will show in field prompts.

191
19
9
Not Checked

If not checked as intermediate, the calculated field will show in the main ‘end-use’ field prompts under All
(or by Category if categorized).

Checked

If checked (i.e., marked as an Intermediate Calculation) then the intermediate calculated field will NOT
appear under All or a Category and will only appear grouped separately under “ Other”. This way you can
reduce the volume of fields shown in your field prompts to not include intermediate calculated fields. You
can still get to your intermediate calculated fields via Other as shown below.

Do Not Use

The Do Not Use check box will append the “Do Not Use” label to your calculated field name to indicate that
this field should not be used going forward. “Do Not Use” fields will also no longer show in the main field
prompt (All or By Category) and can instead be found under Other> Do Not Use Fields.

202
20
0
Advanced Options

Options Include as default View By field in drill downs. This option is only used with matrix reports
and applies to single instance, text, Boolean, date, and numeric calculated fields. It specifies that
the calculated field should be included in the list of "default fields" from which the user can group
data by when drilling down.
Reference This is an identification field that is created by default from the business object name and your
ID calculated field name. You can change the value. This field can be used by implementers for
operations that need to access this field by its ID.

212
21
1
FORMAT DATE

The Format Date function extracts the year, year-quarter, and year-month from a date and formats it as a
text field. It can also extract and format fiscal period, fiscal year, fiscal year-period, and date-time fields.

This function enables you to determine higher level time periods from a date. For example, you could use this
function to group and summarize headcount activity by month or generate a list of promotions by quarter.
You can also use it to extract date components based on an employee's hire date, determine who is going to
have an anniversary next month, or extract the month and date from an employee's birth date.

Year returns a four character field. Quarter returns Q1, Q2, Q3, or Q4. Month and Day returns a two-
character field with a leading zero as necessary. The calculation assumes the first day of the week is Sunday.

When using the Format Date function, you can select from Pre-defined Formats, or provide your own
Format Mask using the legend of valid values.

222
22
2
Format Mask provides additional date formatting flexibility beyond the predefined formats. It allows you to
construct a formatting mask using the options shown in the table below. The mask options are case sensitive
and can be combined with each other, along with spaces and other characters. For example, a format mask
such as h:m a would produce a result such as "9:28 PM". In addition, you can add other text, even if the
text contains these reserved characters, provided that you wrap the text in single quotes, such as: 'Hello,
the time is:' h:m a. This would produce a result like "Hello, the time is 9:28 PM".

The following are examples of tasks you can perform using a calculated date format:

 Group and summarize headcount activity by month.


 Produce a list of promotions by quarter.
 List employees who have a birthday this month.
 Based on an employee's hire date, determine who is going to have an anniversary next month.
 Extract the month and day from an employee's birth date.
 Determine the fiscal year and period in which an employee was hired.

FORMAT DATE - FISCAL YEAR AND PERIOD SCHEDULE

The Format Date function allows you to determine the fiscal period and period schedule information as it
pertains to a date field. You can use Format Date with the fiscal schedules you create. The full steps for
creating fiscal schedules are described in detail in Workday's Financials documentation.

232
23
3
Fiscal Period Returns either the Fiscal Posting Interval Name or the Fiscal
Summary Interval Name you created with the Create Fiscal Schedule
task depending on the Fiscal Period Return Type selected

Fiscal Year Returns a fiscal year name that you've created with the Create Fiscal
Schedule task

Fiscal Year-Period Returns a fiscal year name, followed by a hyphen, followed by either
the fiscal posting interval name or the fiscal summary interval name,
depending on the fiscal period return type

Period Schedule Year-Period Number Returns the period year name, followed by a hyphen, followed by
the period number, such as 2011-01.

Period Schedule Period End Date Returns the period year name, followed by a hyphen, followed by
the month number, followed by a hyphen, followed by the day of
the month, such as 2011-12-31.

Note: Setting up Fiscal Schedules and Period Schedules is beyond the scope of this class.

242
24
4
ACTIVITY 2 – FORMAT DATE

Scenario: Logan McNeil has been asked to modify the WICT CF Employee Report. She has been asked to
format the hire date to Year-Quarter. She also needs to add the Fiscal Pay Period in which each worker
was hired.

TASK 1 – FORMAT HIRE DATE

1. Search for the string Create Calc field.

2. Select the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Hire Date Year-Quarter

Business Object Worker

Function Format Date

4. Click on the OK button.

5. Configure the field as follows:

Field Name Entry Value

Date Field Hire Date

Date Format Year-Quarter

6. On the Additional Info tab configure the field as follows:

Field Name Entry Value

Description Formatted hire date as year-quarter

Category Employment
Customer Defined

Authorized Usage Default Areas

Intermediate Calculation Unchecked

252
25
5
7. Click OK to save the field.

8. Click Done on the confirmation page.

9. Search for the WICT CF Employee Report.

10. Use the related action icon to initiate the Custom Report > Edit task

11. Add the WICT CF Hire Date Year-Quarter next to the existing Hire Date field to the report.

12. Save and run the report.

13. Review the results.

14. ADVANCED (Optional): Try using the Format Mask option to and using the pop up legend,
configure your own mask.

(OPTIONAL) - TASK 2 - CREATE SECOND CALCULATED FIELD TO SHOW THE PAY PERIOD

1. Search for the string Create Calc field.

2. Select the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Hire Pay Period Semi-Monthly


Period

Business Object Worker

Function Format Date

4. Click on the OK button.

262
26
6
5. Configure the field as follows:

Field Name Entry Value

Date Field Hire Date

Date Format Period Schedule Year - Period Number

Period Schedule Semi-Monthly

6. On the Additional Info tab configure the field as follows:

Field Name Entry Value

Description Pay Period when hired

Category Employment
Customer Defined

Authorized Usage Default Areas

Intermediate Calculation Unchecked

7. Click OK to save the field.

8. Click Done on the confirmation page.

9. Search for the WICT CF Employee Report and use the related action icon to initiate the Custom
Report > Edit task.

10. Add the WICT CF Hire Pay Period Semi-Monthly near the existing Hire Date field on the
report.

11. Click OK to save your report and Run. (Note: Employees hired on 01/01/2000 will not show a pay
period in this tenant. Try running “View Period Schedule” for semi-monthly to see tenant setup.)

Questions:

1. Which users in the tenant can edit the definition for WICT CF Formatted Hire Date calc field?

2. Which users in the tenant can access and use the WICT CF Formatted Hire Date calculated field
in reports or rules to see data for the calculated field?

(End of Activity)

272
27
7
INCREMENT OR DECREMENT DATE

The Increment or Decrement Date function calculates a date that is a specified number of milliseconds,
seconds, minutes, hours, days, months, and/or years before or after the value of a date field. This function
returns a Date field type.

If the date field is blank, a run time error will be returned. If Return Blank Date on Error is checked, the
error will be suppressed and a blank date will be returned.

The Increment or Decrement Date calculated field function is commonly used on Global date fields (e.g.
Today, Report Effective Date). It is also useful for change detection, allowing you to derive a date/time field
to lookup the value of a field as of, for example, Today vs. 2 years ago (Today – 2 years).

282
28
8
The following are examples of incrementing and decrementing dates using Calculated fields:

 Calculate two months from now for use in a report filter to select the employee certifications that
expire in the next two months.

 Dynamically calculate the “First day of the month, three months ago,” for use as a parameter for
scheduling a recurring report.

 Subtract one millisecond from the date/time a business process event was completed, so you can
look up the prior value of a field one millisecond before the change to the business process was
applied.

292
29
9
DATE DIFFERENCE

The Date Difference function computes the number of days, months, years, hours, minutes or seconds
between two date or date time related field types. The start date is subtracted from the end date. If the
calculation requires a date constant, it must exist prior to entering the calculated field. The results are rounded
down to the nearest whole number depending on the calculation type selected. This function returns a
numeric field type.

If the start date is greater (later) than the end date, the result is a negative number. If either of the dates is
blank, a run time error will be returned. If Return Zero on Error is checked, the error will be suppressed
and a zero value will be returned.

By default, the year difference calculation (in Years) takes into account the month and day in computing the
number of years. Similarly, by default, the month difference calculation (In Months) takes into account the
day.

Select the Ignore Lower Level Date Components check box if you want the lower level components to
not be taken into account in the date difference calculation. For example, the year difference between April 1,
2006 and Feb 1, 2008 would result in 1 year if the Ignore Lower Level Date Components check box is not
selected (the default) and 2 years if it is selected. Similarly, the months difference between May 15, 2007 and
Sep 14,2007 would result in 3 months if the Ignore Lower Level Date Components check box is not selected
(the default) and 4 months if it is selected.

Following are examples of calculating the difference between two dates:

 Days remaining before an employee returns from leave


 Number of months that a position has been unfilled
 Employee's age in years, as of 12/31/2008

303
30
0
 Number of months an expense report has been back-dated or forward-dated from the current month

ACTIVITY 3 –DATE DIFFERENCE AND INCREMENT


OR DECREMENT DATE

Scenario: Logan McNeil has been asked to modify the WICT CF Employee Report. She has been asked
to add a parking eligibility date field that is exactly 6 months after a worker’s hire date and to create a
Calculated Field for the number of months since an employee’s last base pay increase.

TASK 1 - CREATE INCREMENT / DECREMENT DATE CALCULATED FIELD

1. Search for and run the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Parking Eligibility Date

Business Object Worker

Function Increment or Decrement Date

3. Click on the OK button.

4. Configure the field as follows:

Field Name Entry Value

Date Field Hire Date

Months to Add or Subtract 6 (look for numeric field in Global category)

Return Blank Date on Error Unchecked

5. On the Additional Info tab configure the field as follows:

Field Name Entry Value

Description Parking Eligibility date 6 months after hire


date

Category Employment
Customer Defined

313
31
1
Authorized Usage Default Areas

Intermediate Calculation Unchecked

6. Click OK to save the field.

TASK 2 - CREATE DATE DIFFERENCE CALCULATED FIELD

1. Click on the Create another calculation button

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Months Since Last Pay Increase

Business Object Worker

Function Date Difference

3. Click on the OK button.

4. Configure the field as follows:

Field Name Entry Value

Start Date Field Last Base Pay Increase – Date

End Date Field Today (search for “today”)

Value Returned In Months

Return Zero on Error Check

5. Click OK to save the field and click Done on the confirmation page.

6. Search for the WICT CF Employee Report.

7. Use the related action icon to initiate the Custom Report > Edit task.

8. Add the WICT CF Parking Eligibility Date field to the report.

9. Add the WICT CF Months Since Last Pay Increase field to the report.

10. Add Column Heading Overrides of Parking Eligibility Date and Months Since Last Pay
Increase.

323
32
2
11. Click OK to save and run the report, review results. (End of Activity)

BUILD DATE

Build Date is a function that allows you to build a Date or Time or Date and Time or Date TimeZone field
from its components (e.g. year, month, day). You can specify a given component explicitly or extract the
component value from another date field.

The specific date components that you can construct for a date field are:
 Year
 Month
 Day

The specific time components that you can construct are below. Note that a 24-hr clock is used to enter the
time components.
 Hour
 Minute
 Second
 Millisecond

You can also specify timezone information if using a field type: Date TimeZone.

333
33
3
Build Date can also be a useful function to derive the ‘first or last day’ of a given system date year or month
(e.g. first day of the month based on today’s date) or to derive the ‘first or last day’ of a report’s effective
date year or month (e.g. the last day of the year based on the report’s effective date). These calculated
fields can then, for example, allow for dynamic report filter ranges or scheduling criteria.

343
34
4
ACTIVITY 4 – BUILD DATE

Scenario: Logan McNeil has been asked to create a date field that returns the last day of the month in
which an employee was hired.

1. Search for the string Create Calc field.

2. Select the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Last Day of Month Hired

Business Object Worker

Function Build Date

4. Click on the OK button.

5. Select Date as the Field Type.

6. Configure the field as follows:

Field Name Entry Value

Year Extract Year from Date Field

Value Hire Date

Month Extract Month from Date Field

Value Hire Date

Day Specify Day

Value 31

7. Select (check) the Return Blank Date on Error checkbox.

8. On the Additional Info tab configure the field as follows:

Field Name Entry Value

Description Last Day of Month that employee was hired

353
35
5
Category Employment

Authorized Usage Default Areas

Intermediate Calculation Unchecked

9. Click OK to save the field.

10. Click Done on the confirmation page.

11. Search for the WICT CF Employee Report.

12. Use the related action icon to initiate the Custom Report > Edit task .

13. Add the WICT CF Last Day of Month Hired next to the existing Hire Date field to the report.

14. Click OK to save and Run the report to review the results.

Challenge – How could you create a calculated field that represents the ‘first day of the month
following the worker’s hire date’? So if a worker is hired on Jun 15, 2002, the calculated field would
return July 1, 2002?

(End of Activity)

363
36
6
TRUE/FALSE CONDITION

The True/False Condition function determines if a condition is true or not. The return value is a Boolean type
field, whose value is either true or false, and can be used in custom reporting, condition rules, and as a
condition for other calculated fields. You can use parentheses when necessary to group the conditions for
evaluation.

The following are examples of true/false condition calculated fields:

 Create a field to indicate whether the employee is highly compensated.


 Create a field to indicate whether the employee received a signing bonus that you might need to
recover if the employee terminates.
 Create a field to indicate whether an employee has withholding orders.
 Create a field to indicate whether an employee is currently enrolled in an HSA.
 Create a field that determines whether the employee has one year of service or less

Tip: Put conditions that exclude the greatest number of instances first.

Where possible, remember to use filters/sub filters in your report instead of Calculated Fields for
optimal report performance.

373
37
7
ACTIVITY 5 – TRUE/FALSE CONDITION

Scenario: Logan McNeil has been asked to modify the WICT CF Employee Report. She has been asked to
add a yes/no field that indicates whether or not the employee is highly compensated. Highly compensated
should be yes if the employee makes over $100,000 or is above the Management Level of Manager.

TASK 1 – CREATE CALCULATED FIELD

1. Search for the string Create Calc Fi and run the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF High Comp TF

Business Object Worker

Function True/False Condition

3. Click Ok and configure the condition as follows:

Field Name Entry Value

Field Operator Management Level

Comparison type Frequently Used > In the selection list

Comparison Value Value Specified in this Filter

1 Board of Directors, 2 Chief Executive


Officer, 3 Executive Vice President, 4 Vice
President, 5 Director

4. Add another row for a second filter condition and configure as follows:

Field name Entry Value

And/Or OR

Field Total Base Pay Annualized Amount

Operator Frequently Used > Greater than or equal to

Comparison Type Value specified in this filter

383
38
8
Comparison value 100000

5. On the Additional Info tab configure the field as follows:

Field Name Entry Value

Description Evaluate Comp & Management Level

Category Compensation

Authorized Usage Default Areas

Intermediate Calculation Unchecked

6. Click OK to save.

7. Click the Done button.

TASK 2 - EDIT REPORT - ADD NEW CALCULATED FIELD

1. Search for the Edit Custom Report task.

2. Click the icon.

3. Select the WICT CF Employee Report and click the OK button.

4. Add a new row by clicking on the icon.

5. Click the icon for the field.

393
39
9
6. Look in the Compensation category.

7. Add the WICT CF High Comp TF field to the report.

8. Add a Column Heading Override of Highly Compensated?.

9. Enable the Show No when False display Option.

10. Click OK to save.

11. Use the related action icon to run the report.

12. Scroll through the report while looking at the Total Base Pay column. Anything wrong? How do
some ‘Individual Contributors’ get paid so much? (i.e. Benny Marquez)

(End of Activity)

404
40
0
CONVERT CURRENCY FUNCTION

The Convert Currency function determines the equivalent value of field in a different currency. In Workday,
all monetary fields have an associated currency code.

In addition to converting a source currency amount field to a specific currency, you can also convert the
source currency to the user's preferred currency by entering the global variable Users Preferred Currency in
the Target Currency Code Field prompt. This value can vary from user to user; each user can change their
preferred currency using the Change Preferences task.

To convert currencies, ensure you have setup conversion rates for all the valid Source Currency/Target
Currency/ Currency Rate Type combinations prior to using this calculation function. To do this, use the
Maintain Currency Conversion Rates task. If no conversion rate is found at run time for the Source
Currency/Target Currency/Currency Rate Type combination, this function returns an error.

When the report or condition that uses this calculated field runs, the Currency Rate Type and As of date are
evaluated and the appropriate exchange rate is calculated and returned. If the As of Date Field has a blank
value at run time, the resulting value will be zero and a run time error will be returned. If no data is found for
the combination of Source Currency Amount Field, Target Currency Code Field, and Currency Rate Type, the
resulting field will be zero and a run time error will be returned.

The following are examples of converting currencies:

 Display an employee's annual salary in Euros, regardless of how it is entered or stored in the system.
 Determine all employee bonuses in US dollars, using the exchange rate that was in effect at the end
of last year.
 Convert an expense report total to a common currency (such as USD) for business process approval
rules that are based on an amount.
 Convert Canadian employee benefit contributions into USD for consolidated reporting with US benefit
data.

Please refer to Community documentation around Global Deployments, Currencies and Conversions.

414
41
1
ACTIVITY 6 –CONVERT CURRENCY

Scenario: Logan McNeil has noticed that some employees in the system are not paid in US Dollars.
This causes an error in the evaluation logic and results in some employees being evaluated as ‘Highly
Compensated’ when, in fact, they are not. Logan must use the Convert Currency function to create one
more calculated field. She must also edit the Evaluate Expression calculated field that was created
previously.

TASK 1 – CREATE CALCULATED FIELD

1. Search for the string Create Calc Fi.

2. Select the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Total Base Pay in USD

Business Object Worker

Function Convert Currency

4. Click the OK button.

5. Configure the Calculation tab as follows:

Field Name Entry Value

Source Currency Amount Field Total Base Pay Annualized -–Amount

Target Currency Code Field USD

As Of Date Field Current Moment (DateTime) in Global Fields category

Currency Rate Type use the default value

6. Activate the Additional Info tab and configure as follows:

Field Name Entry Value

Description Convert Total Base Pay to USD

424
42
2
Compensation
Category

Authorized Usage Default Areas

Intermediate Calculation Unchecked

7. Click OK to save the field.

8. Click the Done button.

9. Use search to find & initiate the Edit Calculated Field task.

10. Search for WICT CF to see list of calculated fields created so far in class.

11. Edit the WICT CF High Comp TF True/False condition calculation created in the last activity to
now include the WICT CF Total Base Pay in USD calculated field:

TASK 2 - EDIT CUSTOM REPORT

1. Search for the string WICT CF Emp.

2. Use the related action icon to Edit Custom Report.

3. Add the WICT CF Total Base Pay in USD calculated field next to the Total Base Pay
Annualized – Amount field to see the calculation.

4. Click OK to save your report & Run. (End of Activity)

434
43
3
CREATING LOGICAL CAL CULATED FIELDS

FUNCTION PREREQUISITES

Some calculation functions have prerequisites that are necessary to be set up using other calculated fields
before the desired calculated field can be entered. The two most common prerequisites are defining
constants and defining test conditions. Constants, such as specific dates, numeric values, and text strings,
must first be defined as field constants before they can be referenced in a calculation. Similarly, test
conditions must first be defined as a calculated field using the True/False Condition function before they can
be referenced in a calculation. Having a second browser window open makes it easier to enter any
prerequisites required as you enter calculated fields.

THE WORKDAY CALCULATED FIELD PYRAMID

Design from the top down, Build from the bottom up

444
44
4
EVALUATE EXPRESSION

The Evaluate Expression function groups and transforms data. It evaluates a series of conditions and returns
the value associated with the first condition that is true. At run time the function applies the default value and
then starts testing conditions starting with the first condition defined. If a condition is true, the run-time sets
the corresponding return value and does not test any subsequent conditions. Otherwise, it tests the second
condition, and if true, sets the corresponding return value, and so on.

The evaluated conditions must be Boolean fields that return either true or false at run time. The evaluated
conditions, default values, and return values must already exist for the business object prior to entering the
calculated field.

Using Evaluate Expression you can encapsulate information by evaluating existing data across different fields
and returning values in one Calculated Field as shown in the example below.

454
45
5
Following are examples of grouping and transforming data:

 Employee's employment status (for example, Active, Leave, Terminated, Contractor)


 Employee's management status (for example, Management or Staff)

Tip: Put most likely conditions first.

GLOBAL FIELDS

A global field is a Workday delivered field or customer defined calculated field that is global in nature and can
be accessed by any business object. Simply select “Global” as the business object. Examples of global fields:

 Global constants: 1, 2008-12-31, Is True, Empty, Comma


 Global variables: Yesterday, Current User, First Day of Last Month

COPY CALCULATED FIELD

To copy an existing calculated field, use the Calculated Field > Copy related actions menu item. When
you copy an existing calculated field, the new field must use the same Business Object and the same
Function as the original field.

464
46
6
ACTIVITY 7 –EVALUATE EXPRESSION

Scenario: Logan McNeil has been asked to modify the WICT CF Employee Report. She has been asked to
change the yes/no field that indicates whether or not the employee is highly compensated into a Low,
Medium or High value. The word “High” is used if the employee makes over $100,000 and the word “Low”
is used if the employee makes less than $50,000.

TASK 1 - CREATE 3 GLOBAL TEXT CONSTANTS

1. Search for the string Create Calc.

2. Select the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Low

Business Object Global

Function Text Constant

4. Click the OK button.

5. Set the Text Constant to be the string Low.

6. Click on OK to save.

7. Click on the Create Another Calculation button.

8. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Medium

Business Object Global

Function Text Constant

9. Click the OK button.

10. Set the Text Constant to be the string Medium.

474
47
7
11. Click OK to save.

12. This time, Copy the WICT CF Medium text constant you just created to create your third
constant. Use the related action icon and select Calculated Field> Copy.

13. Define the copied field as follows:

Field Name Entry Value

Field Name WICT CF High

Text Constant High

14. Click OK to save.

TASK 2 - CREATE THE NEEDED TF CONDITIONS

1. Click on the Create Another Calculation button.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Low Comp Boolean

Business Object Worker

Function True/False Condition

3. The true/false condition should be defined as follows:

Field Name Entry Value

Field WICT CF Total Base Pay USD

Operator Frequently Used > Less than

484
48
8
Value specified in this filter
Comparison Type

Comparison value 50000

4. Configure the Additional Info tab appropriately.

5. Click OK to save.

6. Click on the Create Another Calculation button (or Copy your previous TF Condition and edit)

7. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Medium Comp Boolean

Business Object Worker

Function True/False Condition

8. The true/false condition should be defined as follows:

Field Name Entry Value

Field Operator WICT CF Total Base Pay USD

Comparison Type Greater than or equal to

Comparison value Value specified in this filter

50000

9. Add a new condition row and configure as follows:

Field Name Entry Value

And/Or And

Field WICT CF Total Base Pay USD

Operator Less than

Comparison Type Value specified in this filter

Comparison Value 100000

494
49
9
10. Configure the Additional Info tab appropriately.

11. Click OK to save.

12. Click on the Create Another Calculation button (or Copy your previous TF Condition and edit)

13. Define the field as follows:

Field Name Entry Value

Field Name WICT CF High Comp Boolean

Business Object Worker

Function True/False Condition

14. The true/false condition should be defined as follows:

Field Name Entry Value

Field Operator WICT CF Total Base Pay USD

Comparison Type Greater than or equal to

Comparison value Value specified in this filter

100000

15. Configure the Additional Info tab appropriately.

16. Click OK to save.

TASK 3 - CREATE YOUR EVALUATE EXPRESSION

1. Click the Create Another Calculation button.

2. Define the field as follows:

Field Name Entry Value

505
50
0
Field Name WICT CF Eval Comp Level

Business Object Worker

Function Evaluate Expression

3. The Field Type should be Text.

4. Configure the expressions as follows:

Condition Return Value if Condition is True

WICT CF Medium Comp Boolean WICT CF Medium

WICT CF High Comp Boolean WICT CF High

WICT CF Low Comp Boolean WICT CF Low

5. Set the Default value to the Global Text Constant ‘-‘ to catch an error and unexpected
condition.

6. Configure the Additional Info tab appropriately.

7. Click OK to save.

515
51
1
TASK 4 - EDIT REPORT - ADD NEW CALCULATED FIELD

1. Search for the Edit Custom Report task.

2. Click the icon.

3. Select the WICT CF Employee Report and hit the OK button.

4. Add a new row by clicking on the icon at the bottom of the report.

5. Add the WICT CF Eval Comp Level field to the report.

6. Add a Column Heading Override of Compensation Level.

7. Click OK to save and Run the report.

8. Review the results by clicking on the filter icon to filter on the new Compensation Level column.

525
52
2
TASK 5 – OPTIONAL - CHECK OUT A FINANCIALS EXAMPLE

1. From the search box, search for another Evaluate Expression example calc field cf: Talent
Source

This Calculated field is created on the Journal Line business object, and is checking a series of
conditions that if true, will return a configured talent source text constant.

Check out each condition and how each is defined.

2. Now look at where this Talent Source calculated field is being used (hint: look at the Where
Used tab for the Talent Source calculated field definition).

3. This report is a matrix report that is grouping journal lines by this calculated field, Talent Source,
to show Acquisition Costs by Talent source.

4. Check out the report’s definition and run the report to see how results are grouped.

(End of Activity)

535
53
3
CALCULATION HIERARCHY

To view a hierarchy of all the fields used in the calculation and all the fields those fields use, use the
Calculated Field > View Calculation Hierarchy related actions menu item. Calculation hierarchies can
be invaluable in troubleshooting calculated field errors and potential circular references.

545
54
4
ACTIVITY 8 – VIEW CALCULATION HIERARCHY & WHERE
USED INFORMATION ABOUT YOUR CALCULATED FIELDS

In this activity we will answer such questions as: How can you get a good ‘top down’ view of a given
calculated field and all its underlying fields? How can I see where a given calculated field is being used?
How can I see what security groups have access to the calculated field, and if I need to change the access,
what domain security policies to modify?

TASK 1 – VIEW CALCULATION HIERARCHY


1. From the search box, enter cf: WICT
2. See all the calculated field definitions returned.
3. Find your Evaluate Expression calculated field, WICT CF Eval Comp Level , and using related
actions, select Calculated Field > View Calculation Hierarchy.
4. See how you can now see all the underlying fields in the left frame, and as you click on each
field, you can see the definitions in the right frame.
5. Try the View Calculation Hierarchy option on another calculated field.

TASK 2 - WHERE USED TAB


1. From the search box, search for your calculated field using cf: WICT CF Total Base Pay USD
2. Select the result to view the definition.
3. Click on the Where Used tab. See how this calculated field is used in your custom report and
also in another calculated field.

TASK 3 – VIEW SECURITY OF YOUR CALCULATED FIELDS


1. From the search box, search for your calculated field using cf: WICT CF Eval Comp Level
2. Use related actions off the definition and select
a. Calculated Fields > View Security this will show you the security groups that are
configure with access to each underlying secured field
b. Security > View Security – this option will show you what domains the secured fields
are in. Domain security policies are configurable if you need to change the access to the
underlying secured fields.

Remember that the security of your calculated field is based on the underlying security of the
delivered or custom fields used in the calculation.
(End of Activity)

555
55
5
LOOKUP RANGE BAND

The Lookup Range Band function enables you to lookup a specific value and determine where it falls in
relation to a set of ranges that you define.

 Only numeric or currency fields can be evaluated.

 This function returns a single instance field type that corresponds to the range band (the range
of values) in which the source field falls.

 If the value of the field does not meet a defined band, the calculated field will return a blank
instance.

Examples of where looking up a range band could be used include:

 Salary increase percentage


 Length of service
 Days overdue
 Aging of invoices

565
56
6
ACTIVITY 9 – LOOKUP RANGE BAND

Scenario: Logan has been asked to show a Customer Invoice Aging report for all Billable projects according
to needed aging bands. A summary of project counts by Customer Category and Age band is also desired.

TASK 1 – COPY AN EXISTING CUSTOM REPORT

1. From the search box, run the Copy Custom Report task.

2. Select the report: WDINST CF Customer Invoice Aging Report

3. Rename to WICT CF Customer Invoice Aging Report

4. Click OK.

5. Review the report’s data source, primary business object, configured columns, sort, filter and
overall configuration settings. Because the Customer Invoices data source is indexed and
has filters, see how a data source filter is required and has been selected to show all
customer invoices by billable project, so we will expect a prompt for billable project when we
run the report.

6. Click OK to save the copy and Run.

7. Run your report for All available billable projects (select all projects) with the Reporting
date: 12/01/2010

575
57
7
8. Next we will create a calculated field to ‘band’ the aging days.

TASK 2 - CREATE CALCULATED FIELD

1. From the search box, run the Create Calculated Field task

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Lookup Invoice Aging Range Band

Business Object Customer Invoice Document

Function Lookup Range Band

3. Click the OK button.

4. Enter the following information:

Field Name Entry Value

Source Field Aging Days as of Reporting Date

Decimal O

Rounding Round Down

585
58
8
5. Add the following range bands

From Value To Value Return Value

-999 0 0-Current

1 30 1-30 days

31 60 31-60 days

61 90 61-90 days

91 10000 91+ days

6. Configure the Additional Info tab appropriately.


7. Click OK to save the calculated field.

TASK 3 – EDIT REPORT AND RUN

1. Edit the WICT CF Customer Invoices Aging Report


2. Add your calculated field WICT CF Lookup Invoice Aging Range Band

595
59
9
3. Click OK to save the report.

4. Run your report for All available billable projects with the Reporting date: 12/01/2010

5. Click on the Aging days as of Reporting date column to sort the results in ascending order and/or
filter the results to see the invoices by the range bands you defined.

(End of Activity)

606
60
0
LOOKUP DATE ROLLUP

The Lookup Date Rollup is a calculated field function similar to Format Date that is primarily targeted for
Financial Composite Reports. When created, it will return a single instance field type that can be used in
Composite Reports for Control field groupings. It will allow you to take transaction dates and report them in
the format you defined, i.e. accounting transaction date calculated to a period lookup date in a fiscal year
period (2/15/2014 = 2014 02).

Similar to how the Format Date function allows you to map a date field to a fiscal period or schedule, Lookup
Date Rollup can similarly return fiscal periods or schedules. The main difference between the Format Date
calculated field function and Lookup Date Rollup is that Format Date returns a text field type and
Lookup Date Rollup returns a single instance field type. This single instance field type is required for
control fields in Composite reports, allowing you to group, drill and report on data across subreports by a
mapped time period.

Examples of existing date fields that can be used in a Lookup Date Rollup calculation include: accounting
date, budget date, transaction date, document date, etc. You can create Lookup Date Rollup calculated fields
on these fields to be referenced in each subreport that is part of a Composite report.

616
61
1
FORMATS

Workday delivers the following formats


for Lookup Date Rollup:

 Year
 Quarter
 Month
 Year-Quarter
 Year-Month
 Quarter-Year
 Month-Year
 Fiscal Year
 Fiscal Year-Period
 Fiscal Period
 Fiscal Period-Year
 Period Schedule Year-Period Number
 Period Schedule Period End Date

Fiscal formats require you to provide the


fiscal schedule and the fiscal period
return type, i.e. period or summary
schedule.

Period formats require you to provide the


period schedule.

Both Fiscal and Period formats allow you


to create schedules ad hoc.

Tip: When creating a Lookup Date Rollup calculated field, under the Additional Info tab, select the Advanced
Option to include as a default View By field in drill downs.

For more information on Lookup Date Rollup, please refer to the financial Composite Reporting training and
documentation.

626
62
2
WORKING WITH TEXT FU NCTION TYPES

SUBSTRING TEXT

The Substring Text function extracts the specified portion of the text within a field. You can use the
Substring calculated field function to extract a substring from a text or single instance field. Substrings can
be based on fixed positions or delimiters. You can also designate whether to search a string forward or
backwards.

Fixed position examples:

Direction: You can search your field in either a Forward (left to right) or Backwards (right to left) direction
when searching for a delimiter or character position.

636
63
3
Delimiter examples:

Once your delimiter, for example, is found, you can then return the characters before (to the left of) or
after (to the right of) the delimiter.

The following are some examples of using Substring Text:

Before Delimiter Examples (Forward)


Before Delimiter Original String Returned Substring
"-" "ABC-XYZ" "ABC"
"BC" "ABC-XYZ" "A"
"/" "07/04" "07"
After Delimiter Examples (Forward)
After Delimiter Original String Returned Substring
"BC" "ABC-XYZ" "-XYZ"
"W" "ABC-XYZ" ""
"/" "07/04" "04"
After Delimiter Examples (Backward)
After Delimiter Original String Returned Substring
"-" "ABC-XYZ" "XYZ"
"" "Senior Clerk (Pleasanton)" "(Pleasanton)"
"" "Sales and Marketing 7283" "7283"
Between Two Delimiters Examples
Start Delimiter End Delimiter Original String Returned Substring
"[" "]" "ABC-[XYZ]" "XYZ"
"(" ")" "2010 Actuals (Global "Global Modern Services (USA)"
Modern Services (USA))"

646
64
4
68 © 2014 Workday, Inc.
CONCATENATE TEXT

The Concatenate Text function concatenates one or more text (or single instance) fields together and returns
a text field type. If the concatenation requires any text constants, they must already exist prior to entering
the calculated field. Special characters that are commonly used when concatenating fields are provided by
Workday as global text constants. To concatenate fields with a blank space in between them, use the global
text constant Single Space. Any leading or trailing spaces are automatically removed from the results of a
concatenated field.

There are also global fields containing punctuation, parentheses, a line break, spaces, and other useful
strings that you can use in your concatenations.

Following are examples of concatenating text:

 Create a name field that contains an employee's legal last name, comma, space, legal first name,
space, left parenthesis, preferred name, and right parenthesis.
 Append the literal “ (cell)” to the end of a mobile phone number.

69
69
FORMAT TEXT

The Format Text function allows you to change the case of a Text or Single Instance field to Upper Case,
Lower Case, or Proper Case.

The ability to format text case can be of substantial value in certain integrations, like when preparing bulk
mailings for postal entities that require text data to be in a specific format.

Examples of values returned by Format Text are as follows:

Original Value Upper Case Lower Case Proper Case


mark d johNson MARK D JOHNSON mark d johnson Mark D Johnson
Tom McIntosh TOM MCINTOSH tom mcintosh Tom Mcintosh
JoHn O’Neil JOHN O’NEIL john o’neil John O’Neil

 For Proper Case, the first letter of a given string will be converted to upper case with remaining letters in
lower case. The letter following non-letter character will also be converted to upper case, as shown in
John O’Neil. See how for Tom Mcintosh, the ‘i’ is not converted to upper case since it does not follow a
non-letter character.

70
70
ACTIVITY 10 –SUBSTRING TEXT, CONCATENATE TEXT
AND FORMAT TEXT

Scenario: Logan McNeil has been asked to create a calculated field to show a worker’s preferred name and
preferred language in one field, along with the marital status where the country info is removed. She also
needs to format the worker’s full name in UPPER case.

TASK 1 - REMOVE COUNTRY FROM MARITAL STATUS (SUBSTRING TEXT)

1. Edit the WICT CF Employee Report and add a row to include the Marital Status field. Run the
report to see the field values. Our goal will be to pull out the status only (and not the Country) from
this text field.

2. Create a Calculated Field as follows:

Field Name Entry Value

Field Name WICT CF Marital Status

Business Object Worker

Function Substring Text

3. Click the OK button.

4. Set Text Field to Marital Status.

5. Set Substring Type to Before a Delimiter.

6. Set the Delimiter to an open parenthesis '(' (You will find this under Global/Text)

7. Set the Direction to 'Backward'

8. The checkbox for Remove Leading and Trailing Spaces can be either checked or unchecked.

9. Configure the Additional Info tab appropriately.

10. Click OK to save.

71
71
TASK 2 - CREATE WORKER PREFERRED NAME (PREFERRED LANGUAGE) USING
CONCATENATE TEXT

1. Create a Calculated Field WICT CF Preferred Name (Preferred Language) on the Worker Business
object by concatenating the following fields:

a. Preferred Name

b. Single Space

c. ( find under Global Fields> Text

d. Preferred Language

e. ) find under Global Fields > Text

2. Configure the Additional Info tab appropriately.

3. Click OK to save.

72
72
TASK 3 – FORMAT THE WORKER’S FULL NAME TO UPPER CASE
1. Edit the WICT CF Employee Report and add a row to include the Full Name field. Run the report
to see the field values. We will format this field to upper case with a calculated field.

2. Create a Calculated Field as follows:

Field Name Entry Value

Field Name WICT CF Full Name in Upper Case

Business Object Worker

Function Format Text

3. Click the OK button.

4. Set Source Field to Full Name.

4. Set Options to Upper Case

5. Click ok to save.

TASK 4 - EDIT REPORT - ADD NEW CALCULATED FIELDS

1. Edit the WICT CF Employee Report to include your 3 new calc fields to test.

2. Click OK to save and Run the report. Review the results.

(End of Activity)

73
73
CHALLENGE ACTIVITY – DESIGN TOP DOWN, BOTTOM
UP BUILD

What if you needed a field that returns the Supplier associated with a Supplier Invoice Line if one exists,
else if the Supplier is blank, returns the text “Independent Contractor”?
The Supplier field is an existing single instance field on the business object: Supplier Invoice Line.

TASK 1 – DESIGN YOUR CALCULATED FIELD (TOP DOWN)

1. What calculated field function will allow us to derive a field where the value will return the
Supplier if one exists, else it will return the text constant “Independent Contractor”? What
function allows for conditions to be checked to determine what values to return?

2. What will the field type of our calculated field be?

3. Design the calculation - what will the calculation look like? How should it work?

TASK 2 – BUILD YOUR CALCULATED FIELD (BOTTOM UP)

1. What pre-requisite fields do we need?

74
74
(Solution in back of the guide)

75
75
TEXT LENGTH

Text Length returns the length of either a text field or a single instance field. It typically is used as filter
criteria in a custom report to list any employees whose data will be truncated during an integration.

For example, assume the third party you are integrating with only allows a 15-character City field. A
calculated field can be created that determines the length of each employee's City field in Workday, and that
calculated field can then be used in a report filter for a custom audit report that lists any employees whose
City field will be truncated during the integration.

The result is returned as a numeric field.

The following table shows some example return values when using Text Length. Note that spaces are
counted in the returned text length.

Field Name Field Type Field Value Return Value


Primary Address – Line 1 Text 10 Pine Street 14
Primary Address – Line 1 Text 2563 Fourth Avenue 18
Country of Birth Single Instance India 5
Country of Birth Single Instance Singapore 9

76
76
ACTIVITY 11 – TEXT LENGTH

Scenario: The payroll organization has asked Logan McNeil to create a report that shows workers whose
addresses are greater than 26 characters which could impact the external payroll system.

TASK 1 - FIND LENGTH OF ADDRESS

1. Create a Calculated Field as follows:

Field Name Entry Value

Field Name WICT CF Length of Address

Business Object Worker

Function Text Length

2. Find the text length of Primary Home Address

3. Configure the Additional Info tab appropriately.

4. Click OK to save and Done.

TASK 2 – COPY YOUR REPORT TO HAVE A NEW REPORT THAT SHOW WORKERS WITH
ADDRESSES OVER 26 CHARACTERS ON REPORT

1. Find and Copy your WICT CF Employee report and rename your report WICT CF Employees
with addresses over 26 characters

2. Under the Columns tab, add Primary Home Address as a field on your report

3. Still in edit mode, go to the Filter tab and add a filter condition using your text length calculated
field to only show instances where length is greater than 26.

4. Click Ok to save and Run your report. (End of Activity)

77
77
FORMAT NUMBER

The Format Number calculated field enables you to convert the data type of a numeric field to its text
form, formatted in the way that you specify. You have the option to apply specific format masks or include
the currency symbol or currency code as part of the returned text field. Once the numeric field has been
converted to text, you can concatenate it with other text and use it in a report, a notification, and so on.

CONVERT TEXT TO NUMBER

Convert Text to Number enables you to extract a number that currently exists as a text field and
convert it to a numeric data type. For example, using Convert Text to Number you can convert the text
"2006" to the number 2006. Once you have converted the field to a numeric data type, you then have the
flexibility to perform mathematical arithmetic operations on it as required. Convert Text to Number
also includes an option to return zero if the result is not valid, rather than presenting the user with a runtime
error message.

78
78
ACTIVITY 12 – CONVERT TEXT TO NUMBER

Scenario: Logan McNeil has been asked to further filter the WICT CF Employee Report to only show
employees who have 12 or more years of service.

TASK 1 - EDIT REPORT

1. Go back to your WICT CF Employee Report

2. Edit the WICT CF Employee Report and add the Length of Service field. Run the report to
see the field values. Our goal will be to pull out the # of years from this text string, convert text
to number, so that we can then use the number in a filter to only show employees with 12 or
more years of service. (Data shown in screenshot below may not match your tenant exactly)

TASK 2 - CREATE CALCULATED FIELDS

1. Create a Calculated Field as follows:

Field Name Entry Value

Field Name WICT CF Extract Years from Length of


Service

Business Object Worker

Function Substring Text

2. Click the OK button.

3. Define the field as follows:

79
79
Field Name Entry Value

Text Field Length of Service

Substring Type Before a Delimiter

Delimiter Single Space

Direction Forward

Remove Leading & Trailing Spaces Yes

4. Configure the Additional Info tab

a. Mark this calculated field as an intermediate calculation. It is unlikely it would ever


be used on its own, and is only being created in order to create our end-use calculated
field.

5. Click OK to save.

6. Click on the Create Another Calculation button.

7. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Years of Service

Business Object Worker

Function Convert Text to Number

8. Configure the field as follows:

Field Name Entry Value

Text Field WICT CF Extract Years from Length of


Service
 You can search for this field by
name, or using the field prompt,
under Other > Intermediate
Calculated Fields

Decimal Separator Accept Default (Based on user's locale)

Return Zero on Error Yes

80
80
9. Configure the Additional Info tab appropriately.

81
81
10. Click OK to save and Done.

TASK 3 - EDIT REPORT TO FILTER FOR EMPLOYEES WITH 12+ YEARS OF SERVICE

1. Edit the WICT CF Employee Report and go to the Filter tab.

2. Add a Filter condition to only show Employees with 12 or more years of service. Be sure to
select your numeric WICT CF Years of Service calculated field (not the text substring of the
years).

3. Click OK to save and run the report, then review the results. (End of Activity)

82
82
WORKING WITH RELATED BUSINESS OBJECTS

Calculated Field functions can also allow for the promotion and retrieval of fields and instances from Related
Business Objects onto the CFBO.

For example, what if you need to perform a calculation between two fields that are not on the same business
object?

Use the Business Object Details report to see the relationships between business objects and
whether the relationships are 1:1 (Single instance) or 1:M (multi-instance). Understanding the
relationships between objects will be very important when designing needed calculated fields.

83
83
LOOKUP RELATED VALUE

The Lookup Related Value function looks up the value of a field from a related business object. This
function allows you to promote fields from a related business object to the primary business object where you
need it for either a calculation, rule or for reporting.

In order to use the Lookup Related Value calculated field function, there must be a 1:1 relationship between
the two objects.

Note: Lookups where there is a one to many (1:M) relationship can be accomplished by first performing an
Extract Single Instance function and then referencing the resulting single instance field as the Lookup Field.

Following are examples of looking up a value on a related business object:

 Make the Worker’s manager available on Competency business object.


 Make a field from Worker available on Worker Business Process for a business process condition rule.
 Make a field from an RBO available on the PBO so that you can sort the report PBO instances by it.

Tip: Where possible, just use related business object fields in your report instead of Lookup
Related Value calculated fields. The Lookup Related Value calculated field can be useful when
you need to reference the given RBO field in another calculation or make it available in a report
where the report is not able to access the field directly.

84
84
ACTIVITY 13A – LOOKUP RELATED VALUE

Scenario: Logan McNeil has been asked to modify the WICT CF Employee Report. She has been asked to
include a field that shows the number of months difference between the employee’s hire date and the
employee’s manager’s hire date.

Sign in as Logan McNeil (lmcneil)

TASK 1 - EDIT REPORT - ADD MANAGER AND HIRE DATE FIELDS

1. Edit the WICT CF Employee Report and add the following fields.

Business Object Field

Worker Manager – Level 01

Manager – Level 01 Hire Date

2. See how you can access the manager’s hire date by going to the RBO: Manager Level 01 in your
report.

3. Click OK to save and run the report.

4. Filter the report output on the Manager’s Hire Date to find examples where the Worker’s Hire
Date does not equal the Manager’s Hire date.

85
85
TASK 2 - CREATE CALCULATED FIELDS

1. Now, let’s create needed calculated fields to determine the date difference between the
Manager’s Hire date and the Worker’s Hire date.

2. Search and run the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Managers Hire Date

Business Object Worker

Function Lookup Related Value

4. Click the OK button.

5. Set the Lookup Field to Manager – Level 01.

6. Set the Return Value to Hire Date.

7. Configure the Additional Info tab appropriately.

8. Click OK to save.

9. Click on the Create Another Calculation button.

10. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Hire Date Difference from Manager

86
86
Business Object Worker

Function Date Difference

11. Set the Start Date Field to Hire Date.

12. Set the End Date Field to WICT CF Managers Hire Date.

13. Select the Value Returned radio button for In Months.

14. Check the Return Zero on Error checkbox.

15. Configure the Additional Info tab appropriately.

16. Click OK to save and Done.

TASK 3 - EDIT REPORT AND ADD NEW CALCULATED FIELDS

1. Edit the WICT CF Employee Report and add the calculated fields:

Business Object Field

Worker WICT CF Manager’s Hire Date

Worker WICT CF Hire Date Difference From Manager

2. Click OK to save and run the report, then review the results.

87
87
ADVANCED (optional):

1. Edit your WICT CF Employee Report and remove the report filter (under the Filter tab) that we
added in the prior activity for # of years of service > 12.

2. Click OK to save the change and rerun your report. (Your report output should now include all
employees, not just those with more than 12 years of service)

3. Edit your calc field (WICT CF Hire Date Difference from Manager) and this time Uncheck the
Return Zero on Error checkbox.

4. Rerun the report to test it and review the results. You should get an error explaining the case of a
blank or missing date encountered in the date difference calculation.

Why? For terminated employees (such as Eloise Blanchard), the report shows no Manager
information, so the manager’s date is ‘null’ in the report, causing our date difference to error.

(End of Activity)

88
88
MORE ON LOOKUP RELATED VALUE

Lookup Related Value can be a useful function in reporting, calculations, as well as when configuring
business process condition rules.

With matrix reporting, you are limited to just fields from the report’s Primary Business Object (PBO). If
you need to include fields from related business objects (RBOs), you can leverage Lookup Related Value to
make RBO fields available to the matrix report.

In an Advanced report type, you can only access fields from RBOs that are directly related to the PBO (“one
level deep”). In order to include fields that are more than one level away from your report’s PBO, you can
similarly use the Lookup Related Value calculated field function to make needed fields available where you
need them, promoting them up the object relationships.

With business process conditions rules, you are limited to business objects available given the context of
your rule and the business process event. If you need to reference fields in your rules that are not directly
available, you can also leverage Lookup Related Value to make needed fields available where you need them.

Remember that Lookup Related Value requires a 1:1 relationship between the two objects.

Please refer to the Business Object Details report to understand object relationships.

89
89
ACTIVITY 13B (OPTIONAL) – LOOKUP RELATED VALUE

Scenario: Logan McNeil has been asked to create a Matrix Report showing # of Benefit Elections by Benefit
Provider and Benefit Coverage Type. Detail data for each count should include the Benefit Election, the
Worker, and the Worker’s Hire date.

Sign in as Logan McNeil (lmcneil)

TASK 1 - CREATE A MATRIX REPORT

1. Create a custom report as follows (Report type: Matrix)

Field Name Entry Value

Report Name WICT CF Benefit Elections by Provider and


Type

Report Type Matrix

Data Source All Benefit Elections

2. Click OK

3. Configure the Matrix Tab as follows:

Field Name Entry Value

Row Grouping
Group by Field Benefit Provider

Column Grouping
Group by Field Benefit Coverage Type

Summarization Type Count

90
90
4. While still in edit mode, go to the Drilldown tab, and add the following 2 fields under Detail
Data:

a. Benefit Election

b. Worker

c. (Note how the Worker’s Hire date or Total base pay is not available to the matrix report.
You can only select fields from the report’s PBO: Benefit Election, not from the RBO:
Worker)

5. While still in edit mode, go to the Filter tab and add a Filter condition to only show Benefit
Elections a worker is currently enrolled in (field: Currently Enrolled equal to True (checked box))

91
91
6. Click OK to save your report and Run to see the output. Click on a count in the output to see
the detail data

TASK 2- CREATE A CALCULATED FIELD TO MAKE THE WORKER’S HIRE DATE AVAILABLE
TO THE REPORT

1. Select the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field name WICT CF Worker Hire Date on Benefit Election

Business Object Benefit Election

Function Lookup Related Value

3. Click OK

4. Configure the calculation as follows:

Field Name Entry Value

Lookup Field Worker

Return Value Hire date

5. Click OK to save.

92
92
TASK 3 - EDIT MATRIX REPORT TO ADD CALCULATED FIELD

1. Edit your WICT CF Benefit Elections by Provider and Type report

2. Add the WICT CF Worker Hire Date on Benefit Election calculated field under the Drill
Down tab, Detail Data section:

3. Click OK to save your report.

4. Run your report.

5. Click on a count in the output to now see the Worker’s hire date shown in the details. (End of
Activity)

93
93
ACTIVITY 13C (OPTIONAL) – LOOKUP RELATED VALUE

Scenario: Teresa has been asked to report on revenue by company organization code.

Sign in as Teresa Serrano (Tserrano)

TASK 1 – COPY AN EXISTING MATRIX REPORT

1. From the search box, run the Copy Custom Report task

2. Copy the WDINST RW Revenue by Company Org Code report and name it: WICT CF Revenue
By Company Org Code

3. Click OK

4. Review the definition

a. PBO: Journal Line

b. Data Source: Journal Lines, Data Source Filter: Journal Lines for Company

c. Review the Matrix groupings:

i. Group journal lines by Company

ii. Sum the Translated Amount for Natural Debit or Credit field

d. Review the Drilldown tab:

i. Review the Group By Fields: Uses Default Fields for drillable fields

ii. Review the Detail Data Fields: fields to be shown when viewing details.

e. Review the Filter tab – no filter conditions

f. Review the Prompts tab – note many prompt defaults. Why?

94
94
i. The data source Journal Lines has many built-in prompts. Here we can preset
some default values to save data entry at run time.

g. Review the Output tab – chart and table

5. Click OK to save and run the report – accept prompt defaults.

6. See how summarizations are grouped by Company.

7. Click on a Company, for example, Global Modern Services BV (Netherlands) and click on Details.

8. Note how companies have an Organization Code, for example, GMS NLD.

9. Let’s now go back to edit our report to group by Company Organization Code instead.

95
95
10. Try changing your report’s row grouping to Org Code. Note how we cannot access this field.

Why? Because the organization code is a field on the Company bus object, and our report is on
the Journal Line business object. In a matrix report we can only access fields on the report’s
PBO.

11. Let’s now create a calculated field to make the Company Organization code available on Journal
Line so that we can group by it.

12. Cancel and Discard Changes.

96
96
TASK 2- CREATE A CALCULATED FIELD TO MAKE COMPANY ORGANIZATION CODE
AVAILABLE ON JOURNAL LINE

1. From the search box, run the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field name WICT CF Company Org Code on Journal Line

Business Object Journal Line

Function Lookup Related Value

3. Click OK

4. Configure the calculation as follows:

Field Name Entry Value

Lookup Field Company


 Preview the two Company field
options.
 Select the one on business object:
Financial Line

Return Value Code

5. Click OK to save.

97
97
TASK 3 - EDIT MATRIX REPORT TO ADD CALCULATED FIELD

1. Edit your WICT CF Revenue by Company Org Code report

2. Under the Matrix tab, instead of grouping on Company, replace the Company field with your
WICT CF Company Org Code on Journal Line calculated field.

3. Click OK to save your report.

4. Run the report (accept prompt defaults). See how the data is now grouped by Company
Organization Code, made available via a Lookup Related value calculated field.

(End of Activity)

98
98
EXTRACT SINGLE INSTA NCE

The Extract Single Instance function returns a single instance field from a related business object. It allows
you to extract once instance out of many, typically used to retrieve the ‘last’ or ‘first’ or specific
instance of a given object. Based on the number of instances that satisfy the condition specified on the
related business object, either zero or one instance will be returned. The sort field and direction will enable
you select the occurrence that meets your needs.

The Extract Single Instance calculated field function type requires both a Condition field and a Sort field
and the occurrence to be returned. Even if there is only one instance that meets your condition, you are
still required to enter a sort field and select an occurrence.

The following are some examples of extracting a single instance:


 Last Master's degree an employee received.
 Last completed performance review for an employee in 2008.
 Last time off request.

99
99
 Last Payroll Result completed

10
100
0
The Extract Single Instance calculated field function type creates a new field that holds a 1:1 relationship with
an RBO.

Extract Single Instance is often used in conjunction with Lookup Related Value, where you need to
look up a field from a related business object that is 1:M and must first extract a given instance before the
lookup.

Let’s look at an example for our activity.

The Extract Single Instance function determines the return value as follows:

1. The function accesses the related business object associated with the source field you specify.
2. The function applies the filter condition to the instances in the related business object to narrow
down the results. The filter condition must be defined prior to entering this function.
3. The function sorts the resulting data that passed the condition based on the sort field you select.
4. Since this function returns only one instance based on the criteria you specified, the final step is to
identify the instance to be returned. It could be either the first, last or nth occurrence of the sorted
result set.

10
101
1
Tip: Use the most targeted source field (fewest number of needed instances) to extract an
instance from. For example, if wanting to extract a given time off event, use a source field that
just points to time off events, as opposed to all worker events.

10
102
2
ACTIVITY 14 – EXTRACT SINGLE INSTANCE

Scenario: Logan McNeil has been asked to create a calculated field for a Worker’s oldest child dependent.
If a Worker does not have a child listed as a Dependent, the field should be empty. Once the field is
created, add it to the WICT CF Employee Dependents report.

TASK 1 –

1. Search and run the Create Custom Report task.

Field Name Entry Value

Report Name WICT CF Employee Dependents

Report Type Advanced Report

Data Source All Workers

2. Click the OK and add the following fields by clicking on the add row icon as defined below:

Business Object Field

Worker Worker

Dependents Dependent

Dependents Relationship

Dependents Age

Dependents Date of Birth

10
103
3
3. Select the Filter tab and remove workers who do not have any dependents ( Dependents is
not empty)

4. Click OK to save and Run the report.

TASK 2 – CREATE CALCULATED FIELD

1. Search for and run the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Dependent is Child T/F

Business Object Dependent

Function True/False Condition

3. The true/false expression should be defined as follows:

Field Name Entry Value

Field Operator Relationship

Comparison Type Frequently Used > in the selection list

Comparison Value Value Specified in this Filter

Child

10
104
4
4. Click OK to save.

5. Click on the Create Another Calculation button.

6. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Extract Oldest Child

Business Object Worker

Function Extract Single Instance

7. Click OK and configure the Extract Single Instance calculation as follows:

Field Name Entry Value

Source Field Dependents

Condition WICT CF Dependent is Child T/F

Sort Field Age

Sort Direction Descending (Z to A)

Instance to be returned First Occurrence

10
105
5
8. Click OK to save and Done.

9. Add the WICT CF Extract Oldest Child to the WICT CF Employee Dependents report.

10. Save and run the report.

Challenge (optional): Having extracted the oldest Child, extract the worker's spouse and add it to the
report (as shown above)

Your WICT CF Extract Oldest Child calculated field is now a single instance field that you have derived
from an existing multi-instance relationship. By now having this single instance calculated field, you can use
your calculated field like any RBO in your report to access fields for your instance. See example below. (End
of Activity)

10
106
6
EXTRACT MULTI-INSTANCE

The Extract Multi-Instance function returns a multi-instance field from a related business object. It allows
you to extract a multi-instance type field from another instance-based field. Based on the number of
instances that satisfy the condition specified on the related business object, either zero, one, or multiple
instances will be returned.

Commonly used to extract and “point to” a subset of instances in a related business object that meet a given
condition.

10
107
7
The Extract Multi-Instance function determines the return value as follows:
1. The function accesses the related business object(s) associated with the Source Field(s) you
specify and the Operation type selected.
2. The function applies the filter Condition(s) to the instances in the related business object(s) to
narrow the results. The filter condition(s) must be defined prior to entering this function
3. The function returns the instances that meet the specified criteria and operation type.

Other examples:
 List the training each employee has completed in the last 12 months.
 List all the staffing events associated with an employee's current position.
 List the current enrollment elections for an employee.
 List the teams each employee is a member of.
 List any worker event for an employee that occurred in 2009.

Tip: Use the most targeted source field (fewest number of needed instances) to extract
instances from. For example, if wanting to extract a certain time off events, use a source field
that just points to time off events, as opposed to all worker events.

10
108
8
OPERATION TYPES

Subset: Filters instances found in the specified source field (Source Field 1) and returns the
results.

Return workers in the organization who are “high potential” (a subset)

Intersection: Evaluates the filtered instances from both fields (Source Field 1 and Source Field 2) and
returns only the instances that are common to both fields. The Related Business Object
associated with Source Field 1 must be the same as the Related Business Object
associated with Source Field 2.

Return workers in the organization for the last year (intersection)

Except: Evaluates the filtered instances from both specified source fields (Source Field 1 and
Source Field 2) and returns the instances from the first field minus the instances from the
second field. This is particularly useful for exception reporting. The Related Business
Object associated with Source Field 1 must be the same as the Related Business Object
associated with Source Field 2.

Return a list of benefits an employee is currently enrolled in, but not currently eligible for

10
109
9
Union: Combines the filtered instances from both specified source fields (Source Field 1 and
Source Field 2) and returns the results. The Related Business Object associated with
Source Field 1 must be the same as the Related Business Object associated with Source
Field 2.

Return a list for each employee consisting of their manager and HR Partner

Note: All Extract Multi-Instance calculated fields created prior to Workday 16 were based on the Subset
operation type. No other operation types were available.

11
110
0
108 © 2014 Workday, Inc.
ACTIVITY 15 – EXTRACT MULTI-INSTANCE

Scenario: Logan McNeil has been asked to create a calculated field for a Worker’s children and add it to the
WICT CF Employee Dependents report. If a Worker does not have children listed as Dependents, the
field should be empty. Otherwise, the field should contain a list of all the Children (a 1:M Related Business
Object).

1. Search for the string Create Calc field.

2. Select the Create Calculated Field task.

3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Extract All Children

Business Object Worker

Function Extract Multi-Instance

4. Define the field as follows:

Field Name Entry Value

Operation Type Subset

Source Field Dependents

Condition WICT CF Dependent is Child T/F (created in


last activity)

5. Click OK to save .

6. Add the WICT CF Extract All Children to the WICT CF Employee Dependents report.

7. Save and run the report.

Your WICT CF Extract All Children calculated field is now an object type multi-instance field that you have
derived from an existing multi-instance relationship. By now having this multi instance calculated field, you
can use your calculated field like any RBO in your report to access fields for your instances. See example
below.

109
Reminder: Use subfilters where possible instead of calculated fields. Depending on our requirement, here
we could have used a subfilter in the report definition to only see worker’s dependents who are children.

(End of Activity)

110
LOOKUP VALUE AS OF D ATE

The Lookup Value As Of Date function determines the value of a field as of a specific effective and/or
entry date.

For business object fields that support effective dating, you can retrieve a field's value that was in effect as
of a specific date, retrieve a field's latest value that was entered on or before a specific date, or a
combination of both. For business object fields that do not support effective dating, you can only retrieve a
field's latest value that was entered on or before a specific date. Business object fields that support effective
dating are typically populated and maintained by one or more business processes.

For example, assume an employee's proposed salary change was entered on March 15th, which is the data
entry date. That salary change could be recorded to take effect retroactively on March 1st, or to take effect
on March 15th, or take effect in the future on April 1st.

If the calculation requires a date constant, it must already exist prior to entering the calculated field. If you
supply both an effective date and an entry date, Workday looks only at transactions whose entry date
occurred on or before the calculated-field's entry date. Of those, it uses the transaction with the latest
effective date that is on or before the calculated-field's effective date.

Following are examples of determining the value of a field as of a specified date:

 Determine an employee's annual salary as of 12/31/2008.


 Determine an employee's age as of a certain time (for example, as of 1/1/2009).
 List any employees whose name, address, or phone number changed last month.

You can also run a report ‘as of a given effective or entry date’ using Runtime Date Prompts
(Prompts tab) to see data as of a point in time without needing calculated fields. The Lookup

111
Value as of Date CF can be useful if you need the value in a separate field for reference in a
column of its own on a report, or to be used elsewhere (e.g. in another calculation).

112
ACTIVITY 16A - EXTRACT MULTI INSTANCE AND LOOKUP
VALUE AS OF DATE

Scenario: Logan McNeil has been asked to create a report that shows the employees currently in the
organization and employees in the organization one year ago. Additionally, the report should display a
column that lists the employees that were NOT in the organization one year ago.

TASK 1 - CREATE CUSTOM REPORT

1. Search for the string Custom Report.

2. Select the Create Custom Report task.

Field Name Entry Value

Report Name WICT CF Employees in Org Summary

Report Type Advanced Report

Data Source Top Level Organizations and Subordinates

3. Click the OK button to initiate the Report Writer editing page.

4. Under the Columns tab, add the fields by clicking on the add row icon:

1. Organization
2. Employees

5. Save the report by clicking OK.

6. Run the report using the related action icon (Custom Report > Run).

7. Choose Global Modern Services as the Organization (By Organization Type > Supervisory).

TASK 2 - CREATE LOOKUP VALUE AS OF DATE

1. Initiate the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Employees in Org 1 Year Ago

113
Business Object Organization

Function Lookup Value as of Date

3. Click the OK button.

4. Configure the Calculation as follows:

Field Name Entry Value

Source Field Employees

Date as of
Effective Date One Year Ago (can be found under Global Fields >
Date)

5. Click OK to save.

6. Click on the Create Another Calculation button.

7. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Employees New to Org

Business Object Organization

Function Extract Multi-Instance

8. Set the Operation Type to Except.

9. Set the Source Field 1 to Employees. Allow the Related Business Object and Condition to
default.

10. Set the Source Field 2 to WICT CF Employees in Org 1 Year Ago. Allow the Related Business
Object and Condition to default.

11. Click OK to save .

TASK 3 – EDIT REPORT AND TEST

1. Add both the fields to the WICT CF Employees in Org Summary report.

a. WICT CF Employees in Org 1 Year Ago

114
b. WICT CF Employees New to Org

115
2. Change the Column Heading Override as needed. Click OK to save and run the report (End of
Activity)

116
ACTIVITY 16B – DEMO/WALKTHROUGH – MORE ON
LOOKUP VALUE AS OF DATE

1. What operation type would you use if you wanted a calculated field that shows employees that were
in the organization a year ago AND are still there now.

Operation type:

Source field 1:

Source Field2:

2. Create a calculated field that prompts a user for a date and then determine employees in org as of
prompted date (use Global field: Prompt - Date 1).

a. Copy your WICT CF Employees in Org 1 Year Ago calculated field and reconfigure as follows:

b. Add the WICT CF Employees in Org as of Prompt Date CF you just created to the WICT CF
Employees in Org Summary report.

c. Run the report and notice you are prompted for a date value. Enter a date of 01/01/2008.

d. You should now see Employees in Org as of 01/01/2008 in this Calc Field column on your
report. You can re-run the report with different date prompt values to see results as of
different points in time, captured in this Calc Field report column.

(End of Activity)

117
CHANGE DETECTION

Lookup Value as of Date is a useful function for change detection. Using the Lookup Value as of Date
calculated field function, you can:

• Lookup value of a field AS OF two points in time

• Compare field values to see if changed (if not equal)

– Today vs. yesterday

– This moment vs. a millisecond ago

– The effective date of the event vs. the day before the effective date of event

– A prompted date vs. another prompted date

* The Increment or Decrement Date Calculated Function can help derive the ‘millisecond ago’ or ‘day before’
type calculated dates.

Keep in mind that many event objects capture the current and proposed values as part of your
business process events where you can see if the value changed. You can directly use these delivered
fields in reporting to detect change between the current and proposed fields.

118
Calculated fields can be used in cases where the before and after values are not available to the event, or if
you are looking to see changes in values for fields changed outside of business process events or as of
different points in time.

Check out example audit and change detection reports and posts on Workday Community.

Another example showing role assignment changes on a Workday Account as of two points in time.

https://community.workday.com/node/60388

119
PROMPT FOR VALUE

The Prompt for Value calculated field function enables you to create a prompt-able calculated field for use
in a custom report. The calculated field can be used within another calculated field, e.g. driving a condition
for an extract multi-instance calculated field, can appear as a field on the report’s output, or it can be used as
part of the report’s filter condition. When the custom report runs, it prompts you to enter the value that the
calculated field should be set to.

You can define Prompt for Value calculated fields for the following field types:
 Text
 Date
 Date Time
 Date Time Zone
 Time
 Numeric
 Currency
 Boolean
 Single Instance
 Multi-Instance
Prompt for Value calculated fields are similar to Workday’s Global delivered date prompt fields such as
Prompt-Date1, Prompt-Date2. The Prompt for Value calculated field function allows you to configure
your own prompt for values, from prompting for date, numeric, boolean values to prompting for single
instance and multi-instance values of business objects. Beyond this Field Type designation, you can also
configure your Prompt for Value calculated field as required or not.

The Prompt for Value calculated field function is useful when needing to show report results for
prompted values across separate columns on a report. As a reminder: you can use your
report filter or subfilter to prompt the user for a value as well, without calculated fields. Use the
Prompt for Value calculated field when you need to capture the prompted value in another
calculation to show in a separate field.

120
ACTIVITY 17 – PROMPT FOR VALUE

Scenario: Logan McNeil has been asked to show employees by organization with separate columns to show
those employees by a prompted location and (optionally) prompted compensation level.

DESIGN

1. Top down design: Needed Field: Employees by Organization for prompted location.

a. Function: Extract Multi Instance

b. Business Object: Organization

c. Source Field: Employees

d. Condition: Location = Prompted Location

2. Bottom up build, Pre-requisite fields:

a. Need a field that prompts on location

i. Function: Prompt for value

b. Need a condition that returns true if employee’s location = Prompted location

i. Function: True False Condition

TASK 1 – COPY THE REPORT

1. Using related actions, copy the WICT CF Employees in Org Summary report.

2. Rename as: WICT CF Employees in Org with Prompts for Location and Compensation Level

3. Remove (delete) the calculated fields from the prior activity

4. Click OK to save.

TASK 2 – CREATE NEEDED CALCULATED FIELDS

1. Create Calculated Field as follows:

Field Name Entry Value

Field Name WICT CF Prompt for Employee Location

121
Business Object Employee

Function Prompt for Value

2. Click OK

3. Configure the condition as follows:

Field Name Entry Value

Field Type Single Instance

Business Object Location

Required Yes (checked)

4. Click Ok to save.

5. Create Another Calculation as follows:

Field Name Entry Value

Field Name WICT CF Employee Location T/F

Business Object Employee

Function True/False Condition

6. Click OK

7. Configure the condition as follows:

Field Name Entry Value

Field Location

122
Frequently Used > in the selection list
Operator

123
Comparison Type Value from another field

Comparison Value WICT CF Prompt for Employee Location

8. Click Ok to save

9. Create Another Calculation as follows:

Field Name Entry Value

Field Name WICT CF Empl in Org for Prompted Location

Business Object Organization

Function Extract Multi Instance

10. Click OK

11. Configure calculation as follows:

Field Name Entry Value

Operation Type Subset

Source Field Employees

Condition WICT CF Employee Location T/F

12. Click Ok to save.

TASK 3 – EDIT REPORT TO INCLUDE CALC FIELD

1. Edit the WICT CF Employees in Org with Prompts for Location and Compensation Level

2. Add the WICT CF Empl in Org for Prompted Location calculated field to your report under
the Columns tab.

124
3. Click OK to save and run. Run for location=Chicago and Organization=Global Modern Services.

See how you can now see employees in a given organization and whether they are also in a given
prompted location in a side-by-side column with our calculated field.

The prompt for value calculated field, can be used in a True/False Condition which can then be
dynamically used in an Extract Multi-Instance to show the desired subset of instances.

TASK 4 – OPTIONAL - CREATE PROMPT FOR COMPENSATION LEVEL AND ADD TO REPORT

1. Top down design: Needed Field: Employees by Organization by prompted Compensation Level
(High, Medium, Low)

 Function: Extract Multi Instance

 Business Object: Organization

 Source Field: Employees

125
 Condition: WICT Eval Comp Level = Prompted Comp Level

2. Bottom up build, Pre-requisite fields:

 Need a field that prompts on Comp Level. Since our WICT Eval Comp Level is a text field,
we can use the delivered global prompt field: Prompt – Text 1.

 Need a condition that returns true if employee’s comp level = Prompted Text value.

Function: True False Condition

3. Create Calculated Field as follows:

Field Name Entry Value

Field Name WICT CF Employee Comp Level T/F

Business Object Employee

Function True/False Condition

4. Click OK

5. Configure the condition as follows:

Field Name Entry Value

Field WICT CF Eval Comp Level

Operator Frequently Used > equal to

Comparison Type Value from another field

Comparison Value Global Fields > Text > Prompt – Text 1

6. Click Ok to save

7. Create Another Calculation as follows:

126
Field Name Entry Value

Field Name WICT CF Empl in Org for Prompted Comp


Level

Business Object Organization

Function Extract Multi Instance

8. Click OK

9. Configure calculation as follows:

Field Name Entry Value

Operation Type Subset

Source Field Employees

Condition WICT CF Employee Comp Level T/F

10. Click Ok to save.

11. Edit the WICT CF Employees in Org with Prompts for Location and Compensation Level

12. Add the WICT CF Empl in Org for Prompted Comp Level calculated field to your report

13. Click OK to save and run.

14. Enter ‘ Chicago’ for the prompted location, ‘High’ for the prompted compensation level text value
and Global Modern Services for the organization. See how Employees in Organizations with a
‘High’ Compensation Level are now shown in our calculated field separate column.

127
Reminder: You can change the label of the field prompts in your report definition under the Prompts
tab/Prompt Defaults.

(End of Activity)

128
ARITHMETIC CALCULATION

The Arithmetic Calculation function performs simple arithmetic. If the arithmetic calculation requires numeric
constants, they must already exist. You can use parentheses when necessary to specify the order the
calculations should be evaluated. All the fields being operated on must have the same currency code value or
be numeric.

If division by zero is attempted, a run time error will be returned. If Return Zero on Error is checked and
division by zero is attempted, the error will be suppressed and a zero amount will be returned.

Following are examples of arithmetic calculations:

 Calculate an employee's hourly, daily, weekly, or monthly rate.


 Calculate 20% of an employee's salary so that it can be compared against the employee's bonus
amount.
 Calculate an employee's salary difference from this year compared to last year.

129
ANALYZE COMPONENTS O F CALCULATION – ARITHMETIC CALCULATIONS

Goal: Add ESTIMATED ANNUAL CONTRIBUTION to report output

Calculation: $Total Base Pay in USD * (#Employee Election Percentage/100)


 Design from the top down
 Build from the bottom up
 401k – Estimated Contribution Example

Steps:

1. Create numeric constant 100 (Already Exists in GMS Tenant)

2. Move $Total Base Pay in USD from Worker to Retirement Savings Election (Lookup Related
Value)

3. Create Arithmetic Calculation now that all Calculated Fields are in place

4. Add new field to report (define column heading override and show currency symbol)

130
LOOK UP RELATED VALUE

To build a calculation between two fields, those two fields must be on the same Business Object and appear
on the same “level” in the report output.

To create the Estimated Annual and Estimated Monthly Contribution fields you first need to bring the
Worker’s Total Base Pay in USD (our Calculated field from an earlier activity) from the Worker
business Object to the Retirement Savings Election business object. Once there, you now have the
Total Pay in USD and the Employee Contribution Percentage on the same object to then ‘do the math’ on.

131
ACTIVITY 18– ARITHMETIC CALCULATION

Scenario: Logan McNeil has been asked to add some analytical data to the WICT CF 401k Report. The
Benefits Department would like fields that estimate the annual contribution and the monthly contribution
for each employee retirement savings election based on their election percentage and their annual base
pay (in USD).

TASK 1 – COPY A CUSTOM REPORT AND ADD YOUR CONVERT CURRENCY CALC FIELD

1. From the search box, run the Copy Custom Report task and select:WDINST CF 401K
Report

2. Click OK

3. Rename the report as WICT CF 401K Report and click OK.

4. Under the Columns tab, add your calculated field from the Convert Currency previous activity
WICT CF Total Base Pay in USD

Note: You created this Calc Field on Worker, but you can access it off of this report’s
Primary Business Object: Employee as calculated fields defined on Worker are
available on Employee. The Employee business object inherits fields defined on the
Worker business object.

It is a good practice to define calculated fields on Worker (vs. on Employee) so that they
can be accessed off of either business object. If defined on Employee, you can access
the calculated field off of Employee only.

5. Click OK to save and run the report to review results.

132
TASK 2 - LOOKUP RELATED VALUE TO RETRIEVE WORKER’S TOTAL BASE PAY IN USD ON
RETIREMENT SAVINGS ELECTION

1. Create Calculated Field

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Total Base Pay USD on Retirement Savings


Election

Business Object Retirement Savings Election

Function Lookup Related Value

1. Click the OK button.

2. Configure the calculated field as follows:

Field Name Entry Value

Lookup Field Worker

Return Value WICT CF Total Base Pay USD

3. Configure the Additional Info tab appropriately.

4. Click OK to save.

TASK 3 - CREATE ARITHMETIC CALCULATION FIELD FOR ESTIMATED ANNUAL


CONTRIBUTION

1. Click Create Another Calculated Field

133
2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Estimated Annual Contribution

Business Object Retirement Savings Election

Function Arithmetic Calculation

3. Click the OK button.

4. Configure the calculated field as follows:

Field Name Entry Value

Field Type Currency

Rounding Round to nearest 0.01

Currency Code Field USD

Return Zero on Error Yes (check box)

5. Arithmetic Expression:

a. Insert a line and configure as follows

Field Name Entry Value

Field WICT CF Total Base Pay in USD on Retirement


Savings Election

Operator *(Multiply)

b. Insert a new line and configure as follows

Field Name Entry Value

Parentheses ( (

Field Employee Election Percentage

Operator / (Divide)

c. Insert a new line and configure as follows

134
Field Name Entry Value

Field 100 (can find under Global Fields > Numeric.


Shortcut: enter #100)

Parentheses ) )

6. Configure the Additional Info tab appropriately.

7. Click OK to save.

TASK 4 - CREATE ARITHMETIC CALCULATION FIELD FOR ESTIMATED MONTHLY


CONTRIBUTION

1. Click Create Another Calculated Field

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Estimated Monthly Contribution

Business Object Retirement Savings Election

Function Arithmetic Calculation

3. Click the OK button.

4. Configure the calculated field as follows:

Field Name Entry Value

Field Type Currency

135
Rounding Round to nearest 0.01

Currency Code Field USD

Return Zero on Error Yes (check box)

5. Configure the arithmetic expression to divide the estimated annual contribution by 12. (The
global numeric field #12 exists in tenant).

6. Configure the Additional Info tab appropriately.

7. Click OK to save and Done.

TASK 5 - ADD CALCULATED FIELDS TO YOUR REPORT, OVERRIDE COLUMN HEADINGS


AND RUN

1. Edit your WICT CF 401K Report

2. Add the following fields that you just created to your report with Column Heading Overrides: a.

WICT CF Estimated Annual Contribution (show currency symbol under Options) b.

WICT CF Estimated Monthly Contribution (show currency symbol under Options)

136
3. Save and run the report to validate results.

137
SYSTEM-WIDE VS. REPORT SPEC IFIC CALCULATED FIELDS

You typically create calculated fields with either the Create Calculated Field task or the Maintain Calculated
Fields task. Any calculated field you create with one of these tasks is automatically enabled for system-wide
use. However, you can also create a calculated field with more limited scope directly within advanced and
matrix report definitions. These calculated fields are called Report-Specific Calculated fields

REPORT SPECIFIC CALCULATED FIELDS

Report-specific calculated fields are identical to calculated fields defined system-wide, except that they are
only available to a single report definition, and do not appear in the list of system-wide calculated fields that
appears when you run the Maintain Calculated Fields task. You can use report-specific calculated fields in
your advanced and matrix report definitions.

The key benefits of report-specific calculated fields are that they:


 Reduce the "clutter" associated with having calculated fields define system-wide, when they are used
only by a single report or integration.
 Streamline the report definition process for report authors who want to define calculations without
having to coordinate the creation of a calculated field with others.

Report-specific calculated fields are secured in the domain: Private Calculated Fields Management
which is a subdomain of Custom Field Management. You can modify security policies for these domains
to limit who can create system-wide vs. report-specific calculated fields in the tenant.

CREATING REPORT SPECIFIC CALCULATED FIELDS

There are several ways that you can create report-specific calculated fields for a given custom report
definition. Be aware that if you create a report-specific calculated field and it is no longer referenced in your
report, but is still associated with and defined for your report, you will see a warning.

 From a field prompt in the report definition, you can select Create>Create Calculated Field for
Report to add a report-specific calculated field to your report column, prompt, filter, sort, etc.

138
 From the Related action icon off of the report definition, you can select:
o Calculated Field for Report > Create
o Calculated Field for Report > Maintain

 From the Maintain Calculated Fields for Report task for given report, you can use the Add, Edit,
Delete options.

MAINTAIN REPORT SPECIFIC CALCULATED FIELDS

The Maintain Calculated Field for Report task works the same as the Maintain Calculated Fields task for
system-wide calculated fields but results are shown by custom report and the output will display only report
specific calculated fields used in that report. You can edit, delete and add report-specific calculated fields
from this task option as well.

139
CONVERTING CALCULATED FIELDS

You can convert report-specific calculated fields to system-wide calculated fields and vice versa.

 To convert a report-specific calculated field to a system-wide calculated field (so that other custom
reports can reference it), follow these steps:
1. Access the Convert Calculated Field for Report task.
2. Select the Report Name where the calculated field is referenced.
3. Select the Business Object associated with the calculated field.
4. Select the Field.
5. Click OK and then click Done.
 To convert a system-wide calculated field to a report-specific calculated field (so that it is no longer
available to other custom reports), follow these steps:
1. Access the Convert Calculated Field task.
2. Select the Report Name where the calculated field is referenced.
3. Select the Business Object associated with the calculated field.
4. Select the Field.
5. Click OK and then click Done.

140
COUNT RELATED INSTANCES

The Count Related Instances


function dynamically counts
instances of a related
business object based on a
condition or for all
instances.

If a condition is needed, the


test condition must be defined
for the related business object.

Note: This function counts only


instances that you have
security access to view.

141
The following are more examples of counting related instances:

 Count the number of sick days that occurred on Monday or Friday during the last year for each
employee.
 Count the number of employees hired during the last year by location.
 Count the number of open positions in an organization.

142
SUM RELATED INSTANCE S

The Sum Related Instances function


dynamically sums the value of a
field in instances of a related
business object based on a
condition or for all instances.

The calculated field will return either a


numeric or a currency field. A numeric
field type will be returned unless the
Field to Sum is a Currency field type.

Following are some examples of sum related instances:

 Calculate the average performance review rating for each organization.


 Sum the expense line items for meals in an expense report so the sum can be compared against an
approval limit.
 Calculate the VAT amount for each supplier invoice by summing the taxable invoice lines

143
Performance Tip: Use a source field with the most targeted number of instances to process.

For example, if you want to add a field that displays the number of base pay changes in a worker’s
history, create a Count Related Instances field using the source field: Compensation History – Base
Pay Changes Only field rather than Worker Events – Completed or even Compensation History
which would include many more instances to process.

144
AGGREGATE RELATED IN STANCES

The Aggregate Related Instances calculated field lists all the instances associated with a field in a child object
and eliminates any duplicate instances from the results.

You can only aggregate fields that are object type fields (single instance or multi instance), not simple types
(e.g., text, numeric, Boolean, currency, date).

For example, you can use the aggregate related instances calculated field to ‘aggregate’ the validation errors
and warnings for a given expense report across all expense report lines to come up with a unique list of
errors per expense report.

The final result returned would be a multi-instance field that lists all the aggregated validation errors and
warnings across all expense report lines of a given expense report.

145
Another example to show how for a given purchase order, you can aggregate the supplier invoices across all
the supplier invoice lines.

More examples:

 Aggregate Employee Locations by Organization

 Aggregate Job Profiles across all positions in an Organization

 Aggregate users across security groups permitted for a given data source

146
ACTIVITY 19 – COUNT, SUM, AND AVERAGE MEAL
EXPENSE LINES PER EXPENSE REPORT

Scenario: Per expense report, show the number of expense report lines that are Meals, the Sum of the
Meal Expense lines, and the average meal amount per expense report.

TASK 1 – COPY A CUSTOM REPORT

1. Login as Teresa serrano (tserrano)

2. Search for the WDINST Expense Report Related Instances report

3. Using related actions, copy this report (Custom Report > Copy)

4. Save the copied report as: WICT CF Expense Report Related Instances

5. Click OK and run the report

6. At the company prompt (the data source has a built-in prompt), enter Global Modern
Services, Inc. ( Canada)

7. See the expense report data. We will next count the number of expense lines that are ‘meal’
related, we will sum the meal amounts.

TASK 2- COUNT THE NUMBER OF “MEAL” EXPENSE REPORT LINES PER EXPENSE REPORT

1. Go back into Edit mode for you report.

2. Under the Columns tab, add a field after the Expense Report Lines field, and using the prompt,
select Create > Create Report Specific Calculated Field

This new calculated field should be the 3rd field in the report columns. The business object
should be Expense Report.

147
3. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Count Meal Lines

Business Object Expense Report

Function Count Related Instances

4. Click the OK button.

5. Set the calculation as follows:

Field Name Entry Value

Source Field Expense Report Lines

Count Instances where Condition is true

Condition Expense Line is Meals


 Note that if this field did not exist, we would
have to create a True/False condition
calculated field on expense report line for our
condition

6. See how the Additional Info tab has less information with report specific calculated fields.

7. Click OK to save the report specific calculated field.

8. Click OK a second time to save the report.

9. Run the report again for Company: Canada to see the count calculation results.

148
TASK 3 - CREATE ANOTHER REPORT-SPECIFIC TO SUM THE MEAL AMOUNTS PER
EXPENSE REPORT

1. Use related actions off your custom report definition and select, Calculated Fields for Report >
Create Calculated Field

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Sum Meal Lines

Business Object Expense Report

Function Sum Related Instances

3. Click the OK button.

4. Set the calculation as follows:

Field Name Entry Value

Source Field Expense Report Lines

Sum Instances where condition is true

Condition Expense Line is Meals

Field to Sum Extended Amount in Company Base Currency


 Remember that if summing a currency field
across related instances, the field must be in
the same currency code, else the calculated
field will error at runtime when
encountering different currencies.

5. Click OK to save the calculated field and Done.

6. This calculated field though associated with the report definition, has not yet been used in the
report definition.

149
7. View your report definition (hint: click on the report link or run the View Custom Report task from
the search box) to see the warning.

8. Edit your custom report and add your sum related instances calculated field under the Columns
tab, below the count related calculated field you created in Task 2. Business object should be
Expense Report.

9. While still in edit mode, under the Columns tab


a. Also add the Extended Amount in Company Base Currency field for business object:
Expense Report Lines
b. Using field Options, show currency codes and symbols for your currency fields.

10. Click OK to save and Run the report for Company: Canada to see the sum calculations.

150
TASK 4 – CREATE AN AVERAGE MEAL AMOUNT PER EXPENSE REPORT CALCULATION

1. Now let’s try to create a system-wide calculated field that calculates the average meal amount.
From the search box, run the Create Calculated Field task. Remember that this task creates a
system-wide calculated field, not report specific.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Average Meal Amount

Business Object Expense report

Function Arithmetic Calculation

3. Click the OK button.

4. Configure the calculated field as follows:

Field Name Entry Value

Field Type Currency


Rounding Round down to nearest 0.01
Currency Code Reimbursable Total Currency
Return Zero on Error Checked (yes)
Arithmetic Expression
Field WICT CF Sum Meal Lines
 Note how you cannot access this calculated field since
you created it as report specific. It is not available to be
used outside of the specific custom report.

151
5. Cancel and discard changes.

TASK 5 – CONVERT REPORT SPECIFIC TO SYSTEM-WIDE

1. From the search box, run Maintain Calculated Fields for Report

2. Select your report: WICT CF Expense Report Related Instances

3. See your two report specific calculated fields.

4. Try searching for these calculated fields from the search box, using cf: WICT CF Count (or
cf: WICT CF Sum) to see how they are not visible outside of the custom report.

5. From the search box, run the task: Convert Calculated Field for Report

6. Enter the following:

Field Name Entry Value

Report Name WICT CF Expense Report Related Instances

Expense report

152
Business Object
WICT CF Count Meal Lines
Fields WICT CF Sum Meal Lines

7. Click OK and Done.

8. Now try to search for the calculated fields from the search box. They should be visible
system- wide.

TASK 6 – CREATE A CALCULATED FIELD FOR THE AVERAGE MEAL AMOUNT PER
EXPENSE REPORT

1. From the search box, run the Create Calculated Field task.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Average Meal Amount

Business Object Expense report

Function Arithmetic Calculation

3. Click the OK button.

4. Configure the calculated field as follows:

Field Name Entry Value

153
Field Type Currency

Rounding Round down to nearest 0.01

Currency Code Reimbursable Total Currency

Return Zero on Error Yes (checked)

Arithmetic Expression

Field WICT CF Sum Meal Lines

Operator / (Divide)

Field WICT CF Count Meal Lines

5. Click OK to save and Done.

6. Add the WICT CF Average Meal Amount calculated field to your report.

Remember to add it where business object is Expense Report (not Expense Report Lines) as you
created these calculated fields on Expense Report.

Include the “Show Currency Symbol” option.

154
7. Click OK to save and run the report for Global Modern Services Inc. (Canada)

Scroll through the output to see the results calculated.

155
Re-run report for Global Modern Services PLC (U.K.)

(End of Activity)

156
ACTIVITY 20 – AGGREGATE RELATED INSTANCES

Scenario: Teresa must now include a field that shows the aggregate values of the expense item
transactions on a given expense report.

Login as Teresa Serrano (Tserrano)

TASK 1 – CREATE A SYSTEM WIDE CALCULATED FIELD TO SHOW THE AGGREGATE OF


ALL THE BILLABLE EXPENSE ITEM TRANSACTIONS ON A GIVEN EXPENSE REPORT

1. From the search box, run Create Calculated Field.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Aggregate Billable Transactions

Business Object Expense report

Function Aggregate Related Instances

3. Click the OK button.

4. Configure the calculated field as follows:

Field Name Entry Value

Source Field Expense Report Lines

Condition (leave blank)

Fields to Aggregate Expense item for billable transaction

5. Click OK to save

6. Click Done.

7. Go back into edit mode and add your aggregate related instances calculated field:

a. From the search box, run Edit Custom Report

b. Select WICT CF Expense Report Related Instances

c. Add your WICT CF Aggregate Billable Transactions calculated field.

157
Remember that this calculated field is on the business object: Expense Report

8. Click OK to save the report and Run for Company: Canada

Scroll through results to see how the expense report lines transactions are aggregated.

(End of Activity)

158
ACTIVITY 21 - HOW TO TEST CALCULATED FIELDS
WITHOUT WRITING A REPORT
Contextual reporting can be a helpful tool to see the values of your system-wide calculated fields without
having to write a custom report to see the values.

Login as Teresa Serrano (Tserrano)

TASK 1 – FIND AN INSTANCE OF THE OBJECT YOU CREATED CALCULATED FIELDS ON

1. Since we created several calculated fields just now on the Expense Report business object, let’s
find an instance of an expense report in the tenant.

2. From the search box, enter Exp-00003342

3. Click on this specific Expense Report to view the expense report and its details.

4. Using related actions, select Reporting > Report Fields and values

159
5. See the values for all available report fields on the Expense Report business object for this given
instance, including your system-wide calculated fields. Scroll down to find your WICT CF calculated
fields.

The Reporting > Report Fields and Values option shows you what the values would be for all
the report fields available for that business object instance, as if you had written a report with
those report fields and run it for this particular instance.

(End of Activity)

160
LOOKUP ORGANIZATIONA L ROLES

The Lookup Organizational Roles calculated field function returns and looks up the instances assigned to a
given role for the context of the calculated field business object. So for example, if creating the calculated
field on Worker, and looking up a given role, the calculated field will return instances assigned to that role for
the organization context of that given worker. If the business object is Organization, this calculation returns
the assigned instances to the given role specified for the organization currently being processed.

Organizational roles can be assigned to different organization types, e.g. Cost Centers, Location Hierarchies,
Companies. The above example shows organizational roles assigned for a Supervisory Organization.

161
If the Field Type is Single Instance and the organizational role has more than one worker assigned to it, the
function returns the first worker. If the Organization Type field is blank and the Business Object is Worker
or Employee, the system determines all the organizations the employee or worker is assigned to (such as
supervisory, cost center, region, and so on) and return the worker or workers who hold the organization role
for all those organizations.

Following are examples of determining organizational roles:

 List each employee's Expenses Representative.


 Report on the Facilities Manager for each location.

LOOKUP ORGANIZATION

The Lookup Organization function provides the ability to determine a specific organization level or node
assigned in an organizational hierarchy based on a worker's organizational assignment. This calculation
is valid only for Worker and Employee business objects. It takes into account the organization level
security and returns only the organization levels or nodes that the user has rights to access, such as from
organizations that are public. This calculation returns any organization levels or nodes associated with the
worker currently being processed.

Example - Assume that an employee belongs to an organization hierarchy such as the one depicted below
and that the employee is assigned to an organization that is a member of the Finance and Administration
organizational hierarchy node.

Organization Level 1 ABC Company


Organization Level 2 Executive Management
Organization Level 3 Finance and Administration

You can return any organization level associated with the organization to which the employee is assigned by
selecting Organization Associated with Level as the Return Value and specifying the exact level of

162
organization that you want to return. A level of "1" would return "ABC Company". A level of "2" would return
"Executive Management", and so on.

163
You also can look up the specific organization to which an employee or worker has been assigned , by
selecting Organization Assigned as the Return Value. For example, if the employee were assigned to the
Finance and Administration organization, the Organization Assigned option would return "Finance and
Administration."

Below is an example organization chart for the Global Modern Services Location Hierarchy. We will be
using this hierarchy in the next activity. Note the nodes or levels of the hierarchy.

In the activity, based on a given worker’s location, we can use the Lookup Organization calculated field
function using this Location Hierarchy to lookup what level or node in the hierarchy a worker would roll up to.

Level 1

Level 2

164
ACTIVITY 22– LOOKUP ORGANIZATIONAL ROLE &
LOOKUP ORGANIZATION

Scenario: The 401k Administrator has requested that the Benefits Partner be listed on the report along with
where on the location hierarchy they employee rolls up to at level 2.

Login as Logan McNeil (lmcneil)

TASK 1 - CREATE LOOKUP ORGANIZATIONAL ROLES FIELD AS REPORT-SPECIFIC CALC


FIELD

1. Search for the WICT CF 401k Report you copied in a previous activity.

2. Use the related action icon to edit the report definition Custom Report > Edit

3. Add a field to your report. Using the field prompt, select Create>Create Calculated Field for
Report

4. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Benefits Partner

Business Object Employee

Function Lookup Organizational Roles

165
5. Click the OK button.

6. Configure the calculated field as follows:

Field Name Entry Value

Field Type Multi-Instance

Assignable Role Benefits Partner

Organization Type Supervisory

7. Configure the Additional Info tab appropriately.

8. Click OK to save the calculated field.

9. Add another field to the report. Add a row to include the employee’s Location.

10. Now add another row to your report and create a new Report Specific Calculated field as
follows to capture the employee’s Location Hierarchy level 2 organization node:

11. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Location Hierarchy Level 2

Business Object Employee

Function Lookup Organization

12. Click the OK button.

13. Configure the calculated field as follows:

Field Name Entry Value

166
Field Type Single-Instance

Organization Type Location Hierarchy

Top Level Organization Global Modern Services Locations

Return Value Organizations associated with level: 2

14. Configure the Additional Info tab appropriately.

15. Click OK to save the calculated field.

16. Click OK to save and run your report.

Optional:

 Try creating a report-specific calculated field to show the Worker’s Accountant. Leave the
organization type blank to return all organization types for which the role: Accountant is defined. In
our training tenant, Accountant is a valid role for Company and Company Hierarchy org types. (End
of Activity)

 Try converting your report specific calculated fields to system-wide. Task: Convert Calculated Field
for Report (End of Activity)

167
LOOKUP HIERARCHY

The Lookup Hierarchy calculated field makes it easy to report on your hierarchical data in Workday,
including custom hierarchies and financial data.

Lookup Hierarchy is similar to the Lookup Organization calculated field, except that it provides greater
flexibility allowing you to leverage any defined hierarchy. Lookup Organization is limited to just hierarchy
lookups for organizations or workers/employees. Lookup Hierarchy however, enables you to retrieve data
from any Workday object that has an associated hierarchical structure, not just organizations or
workers. So you can use Lookup Hierarchy to report on projects hierarchies, location hierarchies, customer
hierarchies, and so on, greatly expanding your ability to report on hierarchical information in Workday.

For example, you can create a calculated field that returns a level or node in a Project Hierarchy for a given
project, or a level or node in a defined Spend Category Hierarchy for a given Spend Category.

Lookup Hierarchy supports any hierarchical structure defined (not just organizations) and includes custom
organization hierarchies as well.

Organization types supported:

Academic Unit Fund Hierarchy Location Hierarchy Spend category Hierarchy


Hierarchy
Gift Hierarchy Program Hierarchy Sponsor Hierarchy
Business Unit Hierarchy
Grant Hierarchy Region Hierarchy Supervisory
Company Hierarchy
Ledger Account Summary Retiree Organization Supplier
Cost Center Hierarchy
Location Revenue Category Plus Custom Org
Customer Hierarchy Hierarchies

168
The Ledger Account Summary is a commonly used Hierarchy Type for lookups in Financials:

169
LOOKUP HIERARCHY ROL LUP

The Lookup Hierarchy Rollup function is a special calculated field designed to be used in conjunction with a
matrix report definition. Using this calculated field function, users can see matrix report data stepping
through levels of a hierarchy as they drilldown. Summarizations will be rolled up and can be drilled through
leveraging defined hierarchies.

Lookup Hierarchy Rollup supports any Workday hierarchical structure, including custom organizations.

This feature respects the access control that you have to an organization, as configured with Workday
security. When you begin drilling down on the Lookup Hierarchy Rollup field, the drill down automatically
starts at the highest level in the hierarchy to which you have access. If there is data that you don't have
access to, a blank value is returned.

You would then include your Lookup Hierarchy Rollup calculated field as a drillable field.

170
Then when drilling into the matrix report summarization, you can ‘step through’ and ‘drill into’ a
summarization by your defined hierarchy, the cost center hierarchy as shown here in the Top Ten Suppliers
matrix report, grouping supplier invoice lines by Supplier.

171
ACTIVITY 23– LOOKUP HIERARCHY ROLLUP & LOOKUP
HIERARCHY

Scenario: Logan has been asked to modify the purchases by cost center report to allow for rollups by cost
center hierarchy and spend categories captured at a higher level in the spend category hierarchy.

REFERENCES

Chart for Global Modern Services Cost Centers (Cost Center Hierarchy)

Chart for Information Technology 43000000 Spend Category Hierarchy

172
173
Login as Logan McNeil (lmcneil)

TASK 1 – RUN THE EXISTING PURCHASES BY COST CENTER REPORT AND COPY IT

1. Run the Purchases by Cost Center report.

2. Note how the data is captured at the lowest cost center level, and lowest spend category
level. (Refer to the hierarchies referenced in this activity to see the levels currently reported)

3. Using related actions, copy the Purchases by Cost Center report and rename to WICT CF
Purchases by Cost Center

4. Click OK to save the copy of the report.

TASK 2 – CREATE CALCULATED FIELDS TO ROLLUP DATA AT HIGHER LEVEL

1. From the search box, run the Create Calculated Field task to create a system-wide calculated
field.

2. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Cost Center Hierarchy Rollup

Business Object Purchase Order Line

Function Lookup Hierarchy Rollup

3. Click the OK button.

4. Configure the calculated field as follows:

Field Name Entry Value

Source Field Cost Center

Hierarchy Type Cost Center Hierarchy

Top Level Organization Global Modern Services Cost Centers

5. Configure the Additional Info tab appropriately.

6. Click OK to save the calculated field.

174
7. Create another calculated field (Create Another Calculation)

8. Define the field as follows:

Field Name Entry Value

Field Name WICT CF Spend Category Level 3

Business Object Purchase Order Line

Function Lookup Hierarchy

9. Click the OK button.

10. Configure the calculated field as follows:

Field Name Entry Value

Source Field Spend Category

Hierarchy Type Spend Category Hierarchy

Top Level Node in Hierarchy All > Spend Category Hierarchy > 43000000 –
Information Technology

Hierarchy Node to be Returned Level Number: 3

11. Configure the Additional Info tab appropriately.

12. Click OK to save the calculated field and Done.

TASK 3 – EDIT YOUR REPORT TO INCLUDE YOUR CALCULATED FIELDS TO GROUP DATA
AT HIGHER LEVEL

1. Edit yourWICT CF Purchases by Cost Center report. (you can search for it in the search
box and use related actions to Edit the definition.)

2. Under the Matrix tab,

a. Replace the row grouping field with WICT CF Cost Center Hierarchy Rollup

b. Replace the column grouping field with WICT CF Spend Category Level 3

175
3. While still in Edit mode, under the Drilldown tab,

a. Under Drillable Fields, add the WICT CF Cost Center Hierarchy Rollup field

4. Click OK to save and Run your report.

5. See how the cost center data is rolled up to the Cost Center Hierarchy top level for the row
grouping and the spend categories are now grouped at the Spend Category Hierarchy Level 3
for the column grouping.

176
6. Drill into the total purchases amount using your WICT CF Cost Center Hierarchy Rollup
calculated field to breakdown the total based on the defined cost center hierarchy.

7. Repeat the drilldown for Information Technology

8. You can now see purchase order totals according to the nodes and levels in your cost center
hierarchy instead of at the individual cost center level originally in the report.

177
LOOKUP TRANSLATED VA LUE

This calculated field enables you to look up the value of a text field in another language. For example, you
might want to create a custom report that returns both the English and French names of your organizations.
Having the ability to easily look up the translated value of a field make this possible. You can use Lookup
Translated Value with any text field associated with the selected business object that has been enabled for
translation. This function returns the text field in the language you specify. The language must be one that is in
the list of available languages specified in your tenant setup. You have the option to simply return the field in
the base language, rather than producing a runtime error message, if no translated value is available for a
particular instance.

The following examples illustrate some ways in which can use Lookup Translated Value:

 Return both the English, French, and German names of your organizations.
 Return all translated values available for text fields associated with the selected business object.

178
178

You might also like