The HCM Spreadsheet Loader (HSDL) is a flexible way to load data, and most Fusion HCM teams have used it. But have you explored the Payroll Flow pattern? It gives business users a simpler route: upload a delimited file and submit a flow, with the technical setup done once by a developer.
This post walks through the approach using User Defined Table – Column Instance Values as the business object, from the one-time setup to submitting the flow and checking the result.
- Payroll flow
- Load Spreadsheet from File
- Business object
- User Defined Table – Column Instance Values
- Fast formula
- Type HCM Data Loader, name
XXX_TEST_FF - File format
- Delimited text file, with
|as the delimiter
Prerequisites
- The role and privilege required to access the payroll flow.
- A sample user defined table:
XXX_TEST_UDT. - Sample data for the user defined column:
GR_SA_01. - Sample data for the user defined row:
Riyadh-Jeddah.
The steps below cover the one-time setup (steps 1 to 3). After that, end users only need steps 4 to 6.
1Define the spreadsheet
Create the spreadsheet template for the user defined table column instance object and select the attributes you want to load. The selected attributes, in this order, define the columns of your data file.
2Finalize the data file format
Each line of the file holds one value, with the fields separated by a pipe (|). A sample line:
SA Legislative Data Group|XXX_TEST_UDT|GR_SA_01|Riyadh-Jeddah|2025/01/01|4712/12/31|500
| Position | Field | Sample value |
|---|---|---|
| 1 | Legislative Data Group name | SA Legislative Data Group |
| 2 | User defined table code | XXX_TEST_UDT |
| 3 | User defined column code | GR_SA_01 |
| 4 | Row name | Riyadh-Jeddah |
| 5 | Effective start date | 2025/01/01 |
| 6 | Effective end date | 4712/12/31 |
| 7 | Value | 500 |
3Define the fast formula
Create a fast formula that tells the flow how to read the file and map each position to the right attribute.
| Setting | Value |
|---|---|
| Type | HCM Data Loader |
| Name | XXX_TEST_FF |
/* Inputs */
DEFAULT FOR POSITION1 IS 'NO DATA'
DEFAULT FOR POSITION2 IS 'NO DATA'
DEFAULT FOR POSITION3 IS 'NO DATA'
DEFAULT FOR POSITION4 IS 'NO DATA'
DEFAULT FOR POSITION5 IS 'NO DATA'
DEFAULT FOR POSITION6 IS 'NO DATA'
DEFAULT FOR POSITION7 IS 'NO DATA'
DEFAULT FOR POSITION8 IS 'NO DATA'
DEFAULT FOR POSITION9 IS 'NO DATA'
DEFAULT FOR LINEREPEATNO IS 1
INPUTS ARE OPERATION (text), LINENO (number), LINEREPEATNO (number),
POSITION1 (text), POSITION2 (text), POSITION3 (text), POSITION4 (text),
POSITION5 (text), POSITION6 (text), POSITION7 (text), POSITION8 (text),
POSITION9 (text)
IF OPERATION='FILETYPE' THEN
OUTPUTVALUE='DELIMITED'
ELSE IF OPERATION='DELIMITER' THEN
OUTPUTVALUE='|'
ELSE IF OPERATION='READ' THEN
OUTPUTVALUE='NONE'
ELSE IF OPERATION = 'NUMBEROFBUSINESSOBJECTS' THEN
(
OUTPUTVALUE = '1'/*Always be 1*/
RETURN OUTPUTVALUE
)
ELSE IF OPERATION = 'METADATALINEINFORMATION' THEN
(
METADATA1[1] = 'XXX_UDT_LOAD_VALUES' /*TemplateCode*/
METADATA1[2] = 'UserDefinedTableColumnInstance' /*FileDiscriminator*/
METADATA1[3] = 'UserDefinedTable_LegislativeDataGroupName'
METADATA1[4] = 'UserDefinedTable_UserTableCode'
METADATA1[5] = 'UserDefinedTableColumnInstance_UserColumnCode'
METADATA1[6] = 'UserDefinedTableColumnInstance_RowLowRangeOrName'
METADATA1[7] = 'UserDefinedTableColumnInstance_EffectiveStartDate'
METADATA1[8] = 'UserDefinedTableColumnInstance_EffectiveEndDate'
METADATA1[9] = 'UserDefinedTableColumnInstance_Value'
RETURN METADATA1 /*You can return only one METADATA for the respective template*/
)
ELSE IF OPERATION='MAP' THEN
(
FileName = 'XXX_UDT_LOAD_VALUES'
BusinessOperation = 'HSDL'
FileDiscriminator = 'UserDefinedTableColumnInstance'
UserDefinedTable_LegislativeDataGroupName = POSITION1
UserDefinedTable_UserTableCode = POSITION2
UserDefinedTableColumnInstance_UserColumnCode = POSITION3
UserDefinedTableColumnInstance_RowLowRangeOrName = POSITION4
UserDefinedTableColumnInstance_EffectiveStartDate = POSITION5
UserDefinedTableColumnInstance_EffectiveEndDate = POSITION6
UserDefinedTableColumnInstance_Value = POSITION7
RETURN BusinessOperation,FileDiscriminator,FileName,UserDefinedTable_UserTableCode,
UserDefinedTable_LegislativeDataGroupName,UserDefinedTableColumnInstance_UserColumnCode,
UserDefinedTableColumnInstance_RowLowRangeOrName,UserDefinedTableColumnInstance_EffectiveStartDate,
UserDefinedTableColumnInstance_EffectiveEndDate,UserDefinedTableColumnInstance_Value
)
ELSE
OUTPUTVALUE='NONE'
RETURN OUTPUTVALUE
/* End Formula Text */
The formula responds to a set of operations:
| Operation | What the formula returns |
|---|---|
FILETYPE | DELIMITED: the file is a delimited text file. |
DELIMITER | |: fields are separated by a pipe. |
READ | NONE. |
NUMBEROFBUSINESSOBJECTS | 1. This value is always 1. |
METADATALINEINFORMATION | The template code, file discriminator and attribute names. Only one metadata can be returned for a template. |
MAP | The mapping of each file position (POSITION1 to POSITION7) to the user defined table attributes. |
That completes the development work. From here, the end user can prepare the file and submit the payroll flow.
4Prepare the file
Prepare the file in the format defined in Step 2 and save it as a text file on your desktop, for example UDT_Load_Batch1.txt.
5Submit the payroll flow
Submit the Load Spreadsheet from File flow. Upload your file, select the fast formula XXX_TEST_FF as the transformation formula, and submit.
The flow then generates the spreadsheet data loader template file and initiates the data loader. You can follow the progress on the flow page.
6Verify the result
Open Import and Load Data and check the Import Success and Load Success columns for your data set.