Progress with Redwood: Redwood Resources for Oracle Cloud HCM - Go Here
How to Create Conditions in Visual Builder – Hire an Employee Flow
Hello,
we are currently customizing the Hire an Employee flow using Visual Builder, and we would like to apply a specific condition within the Assignment section.
The requirement is the following:
→ When the value selected in the Working Hours Type field is Full-Time, then the FTE field should automatically be set to 1.
This is the rule we configured on Visual Builder:
This is the code:
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
* Default value expression for addPersonWorkRelationships.FTEValue
* @param {object} context
* @return {string|null}
*/
function getAddPersonWorkRelationshipsFTEValue(context) {
const { $fields } = context;
const workingHoursType = $fields.employmentAssignments.WorkingHoursType.$value();
if (workingHoursType === 'Full-time') {
return '1';