ポジションのビジネス・ルールの構成
次のポジション プロセスとページで、デフォルトおよび検証ルールを作成できます。
- 新規ポジションの要求
- ポジション変更の要求
- ポジション
- ポジションの作成
- ポジションの重複
- 職階の更新
- ポジションの訂正
次のページで作成できるデフォルトおよび検証ルールのリストを次に示します。
- 職階属性に基づいて職階DFFの値をデフォルト設定します
- 職階名の検証
- 標準勤務時間の検証
例
例1: 正社員または臨時フラグに基づいて位置DFFの値をデフォルト設定
拡張式
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
* Default value expression for positionsV2.positionsDFF.payscale
* @param {object} context
* @return {string}
*/
function getPositionsV2PositionsDFFPayscale(context) {
const { $objectContext, $fields, $modules, $user } = context;
if($fields.positionsV2.RegularTemporary.$value() === 'T'){
return 'CW';
}
return null;
}
return { getPositionsV2PositionsDFFPayscale };
});
例2: 職階名を検証して、役職名と部門名が含まれているかどうかを確認します。
拡張式
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
let job = $fields['positionsV2']['job'].$value();
let department = $fields['positionsV2']['department'].$value();
if (job && department ) {
let reqName = (job.JobName).substr(0,3) + '-' + (department.Name).substr(0,3);
let positionName = $fields['positionsV2']['PositionName'].$value();
if(positionName !== reqName){
return true;
}
}
return false;
}
return { runCondition };
});
例3: 標準勤務時間の検証: 標準勤務時間が37.5または40でない場合、エラー・メッセージを表示します。
拡張式
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
let stdwh = $fields['positionsV2']['StandardWorkingHours'].$value();
if (Number(stdwh) !== 37.5 && Number(stdwh) !== 40) {
return true;
}
return false;
}
return { runCondition };
});