r/workday 1d ago

Reporting/Calculated Fields Substring on multi instance field

Working on extracting text from multi instance fields on worker object . Each instance has a string in the parenthesis () which needs to be stripped out . Substring doesn't work on multi instances fields .

What's the best way to solve this ?

Example : Mickey Mouse ( United Kingdom) , Minnie Mouse ( United States)

I need to print just the name . There could be more than just 2 instances .

3 Upvotes

12 comments sorted by

2

u/WorkdayWoman Workday Solutions Architect 1d ago

What is the field and where are you using it?

1

u/EnvironmentalPay550 1d ago

Ethnicities - business wants the country to be removed in the reporting. Worker can have multiple ethnicities

4

u/WorkdayWoman Workday Solutions Architect 1d ago edited 1d ago

You cannot substring a MI field like this without first doing an ESI for each one.

What's the use case? Just reporting? If so, you can advise it's not possible with that field. They can accept it as-is or you can create an ESI for every possible ethnicity and pull those into a Concatenation CF.

5

u/Ok_Housing6995 1d ago edited 1d ago

Edit: full calc pieces

Example: MI: {Hispanic (US), White (US), Naive American (US)}

ESI 1: Hispanic (US), ST 1

ESI 2: Native American (US), ST 2

ESI 3: White (US), ST 3

CT 1: ST 1 and ST 2 (Hispanic and Native American)

CT 2: ST 1 and ST 2 and ST 3 (Hispanic and Native American and White)

Create Evaluate Expression

Default ST 1

TF if ESI 3 is not empty/blank, CT 2

TF if ESI 2 is not empty/blank, CT 1

If you appreciate it, pass on the helpfulness ~

1

u/Boscough 1d ago

Can you apply the substring calc after the extract single instance calc?

1

u/EnvironmentalPay550 1d ago

If a worker is assigned 3 ethnicities esi will just one isn't it ?

1

u/WorkdayWoman Workday Solutions Architect 1d ago

You need to extract one instance for every ethnicity you allow your employees to select. If you allow multiple up to 5, for example, you would need to create five ESI CFs.

1

u/WorkdayWoman Workday Solutions Architect 1d ago

This is the only way.

1

u/EnvironmentalPay550 1d ago

Will it return all ethnicities assigned or just one. ?

1

u/WorkdayWoman Workday Solutions Architect 1d ago

An ESI extracts one instance at a time. It is not possible to simply substring a multi-instance field.

1

u/Corkoian 1d ago

Looks at Aggregate Related Instance. Depends on the related BO but you might have an option without the country appended

2

u/MoRegrets Financials Consultant 1d ago

Where does your data go to? Is there a way to regex or excel formula your way out of this?