Consider this scenario when a employee leave the company
- When employee raise a leaver request, you might want to show date of leaving and reason of leaving as mandatory fields on form
- When this leaver request work flowed to manager, you want both date of leaving and reason of leaving to be displayed as ready only; and to show another text box to allow manager to enter some comments.
- Lastly, when HR Admin received this leaver request, HR Admin all fields on form should be displayed only.
If you have multiple scenarios as above within a form scenario, you might want to use scenario step to divide them into few steps, and to work as stage of the form is with who and how the form should be behaved.
To implement the above scenario, others than making use of scenario step(s), you will need to do a few things.
- Firstly, scenario step value will be stored in a field called 'FORM_SCENARIO_STAGE'. Thus you will need to append this field into special field table under IF_HRASR00GEN_SERVICE~GET_SPECIAL_FIELDS method of your generic service.
- Secondly, add FORM_SCENARIO_STAGE field into your fields table
- Now during you can read this field from special fields table in your INITIALIZE / DO_OPERATION method whenever your forms first loaded and refreshed.
- Also, you can do some form scripting to control on the form behavior based on the scenario step's value. For example below, if your form being open during step HRS, you want to make this fields as a visible and mandatory field.
if ( ($record.FORM_SCENARIO_STAGE.DATA.FIELD == "HRS" &
$record.MASSG.DATA.FIELD == "09" ) |
then
this.presence = "visible"
this.access = "open"
this.mandatory = "error"
else
this.presence = "hidden"
endif
- When employee raise a leaver request, you might want to show date of leaving and reason of leaving as mandatory fields on form
- When this leaver request work flowed to manager, you want both date of leaving and reason of leaving to be displayed as ready only; and to show another text box to allow manager to enter some comments.
- Lastly, when HR Admin received this leaver request, HR Admin all fields on form should be displayed only.
If you have multiple scenarios as above within a form scenario, you might want to use scenario step to divide them into few steps, and to work as stage of the form is with who and how the form should be behaved.
To implement the above scenario, others than making use of scenario step(s), you will need to do a few things.
- Firstly, scenario step value will be stored in a field called 'FORM_SCENARIO_STAGE'. Thus you will need to append this field into special field table under IF_HRASR00GEN_SERVICE~GET_SPECIAL_FIELDS method of your generic service.
- Secondly, add FORM_SCENARIO_STAGE field into your fields table
- Now during you can read this field from special fields table in your INITIALIZE / DO_OPERATION method whenever your forms first loaded and refreshed.
- Also, you can do some form scripting to control on the form behavior based on the scenario step's value. For example below, if your form being open during step HRS, you want to make this fields as a visible and mandatory field.
if ( ($record.FORM_SCENARIO_STAGE.DATA.FIELD == "HRS" &
$record.MASSG.DATA.FIELD == "09" ) |
then
this.presence = "visible"
this.access = "open"
this.mandatory = "error"
else
this.presence = "hidden"
endif
No comments:
Post a Comment