Substring Text
Security:
Custom Field Management
domain in the System functional area.You can use the calculated field to extract a portion of text from a single instance or text field and return the result as a text field.
- Access theCreate Calculated Fieldtask.
- SelectSubstring Textfor theFunction.
- On theCalculationtab, select a single instance or text field for theText Field.If you select a single instance field, Workday uses the display ID value of the field.
- Select theSubstring Type.In theFixed Position, the first character in the field holds position 1, the second character holds position 2, and so on. You can specify the length of the substring to extract with these options:
Option Description Fixed LengthThe length of the substring starts at the specifiedStarting Character Positionand continues for the specified length of characters. The substring value returns shortened or padded with spaces if:- TheStarting Character Positionis greater than the length of the text field.
- The text field doesn't have enough characters to return a substring with a length equal to the fixed length specified.
Until End of Text FieldThe length of the substring returned varies. The substring starts at the specifiedStarting Character Positionand continues to the end of the field. - (Optional) For theBetween two DelimitersSubstring Type, select theExclude Results without End Delimiterscheck box to exclude field results without an end delimiter and display a blank value. Clear the check box to return all field results, including results without an end delimiter.
- Select theRemove Leading and Trailing Spacescheck box to remove spaces at the beginning and end of the substring.Example: If you have "A B C D " as the original string, you can select 2 as the start position and 5 characters as the fixed length. The substring is " B C " since spaces count as characters. The result is "B C" because Workday automatically removes leading and trailing spaces from the substring.
- (Optional) In theAdvancedsection on theAdditional Infotab, select theDo not use Alternate Display IDcheck box from theOptionsprompt.Instead of using the alternate display ID, Workday uses the display ID from the text source for substring text extraction.
After a Delimiter | Original String | Substring Result |
|---|---|---|
"-" | "ABC-XYZ" | "XYZ" |
"BC" | "ABC-XYZ" | "-XYZ" |
"W" | "ABC-XYZ" | "" |
"/" | "07/04" | "04" |
After a Delimiter | Original String | Substring Result |
|---|---|---|
"-" | "ABC-XYZ" | "XYZ" |
" " | "Senior Clerk (Pleasanton)" | "(Pleasanton)" |
" " | "Accounting 6373" | "6373" |
" " | "Sales and Marketing 7283" | "7283" |
Before a Delimiter | Original String | Substring Result |
|---|---|---|
"-" | "ABC-XYZ" | "ABC" |
"BC" | "ABC-XYZ" | "A" |
"W" | "ABC-XYZ" | "" |
"/" | "07/04" | "07" |
Start Delimiter | End Delimiter | Original String | Substring Result |
|---|---|---|---|
"[" | "]" | "ABC-[XYZ]" | "XYZ" |
"(" | ")" | "Logan McNeil (41600 HR Services)" | "41600 HR Services" |
Starting Character Position | Original String | Substring Result |
|---|---|---|
2 | "Senior Clerk" | "enior Clerk" |
8 | "Senior Clerk" | "Clerk" |
13 | "Senior Clerk" | "" |
Starting Character Position | Fixed Length | Original String | Substring Result |
|---|---|---|---|
2 | 5 | "Senior Clerk" | "enior" |
8 | 5 | "Senior Clerk" | "Clerk" |
8 | 3 | "Senior Clerk" | "Cle" |
8 | 10 | "Senior Clerk" | "Clerk " |
13 | 4 | "Senior Clerk" | " " (4 spaces) |
- Create additional calculated fields.
- Create new calculated fields from within a substring text calculated field.