Create Leave Request Entity
Last updated
Last updated
Learn about step to create entity for requester who need to make leave request.
From the App space screen, click Form and then popup dialog will opens.
Enter name in field Component Name and click Start Design.
Click Pencil Icon for open Entity Configuration
Change Tab Condition to "Y"
Click OK.
3. From Tools > Tabs drag 2-Layer Tab to the silver box under entity name. The dialog of Add Tab data opens. Put "Leave Request" to Title and then click Add.
4. From Tools > Module drag 1-1 to the box under the Leave Request tab.
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Leave Request". Change Table Name to "wf_service_request (T)".
Set SQL Work Queue to "select wf_service_request.request_id, wf_service_request.requester, wf_service_request.sub_request_type from wf_service_request where wf_service_request.request_type = '04'".
Click OK.
Click icon Configuration Layout and the dialog opens. Select 2 Column and then click Accept. The table that has 2 columns will show.
5. From Tools > Field drag Text Box to the first cell of the table. (From step 4) The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Put "readonly" to Source
Change FIELD_ID to "REQUEST_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
Switch ShowSearch to "Y".
Change showSearchSeq to "1".
Change Alignment to "center".
Click OK
6. From Tools > Field drag Text Box to the first cell of the table. (From step 4.6) The textLabel shows.
Click pencil icon. The dialog of Text box Configuration opens.
Change FIELD_ID to "REQUEST".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Requester".
Switch SearchCriteria to "Y".
Switch ShowSearch to "Y".
Switch searchPreLike to "Y".
Switch searchLike to "Y".
Switch searchIgnoreCase to "Y".
Change Search FieldGroup to "1".
Change SearchCriteriaSeq to "1".
Change showSearchSeq to "2".
Change Alignment to "left".
Click OK.
7. From Leave Request Module click icon append row. The system will append new row to the table.
8. From Tools > Field drag Dynamic List to the first cell of new row (From step 7) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_sub_request_type".
Change Column Show to "SUB_REQ_NAME".
Change Column Value to "SUB_REQ_TYPE_ID".
Change Condition Value to "request_type='04'".
Change FIELD_ID to "SUB_REQUEST_TYPE".
Change ShowFieldName to "Leave Type".
Switch SearchCriteria to "Y".
Switch ShowSearch to "Y".
Change Search FieldGroup to "1".
Change SearchCriteriaSeq to "2".
Change showSearchSeq to "3".
Change Alignment to "left".
Click OK.
9. From Tools > Field drag Dynamic List to the second cell of new row (From step 8) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_project".
Change Column Show to "PROJECT_NAME".
Change Column Value to "PROJECT_ID".
Change FIELD_ID to "PROJECT".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Project".
Change Alignment to "right".
Click OK.
10. From Leave Request Module click icon append row. The system will append new row to the table.
11. From Tools > Field drag Text Area to the first cell of new row (From step 10) The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "CONTACT_INFO".
Change ShowFieldName to "Contact/Tel.".
Change Alignment to "left".
Click OK.
12. From Tools > Field drag Hidden to the second cell of new row (From step 10) The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change Defultvalueto "04".
Change FIELD_ID to "REQUEST_TYPE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "RequestType".
Click OK.
13. From Leave Request Module click icon append row. The system will append new row to the table.
14. From Tools > Field drag Dynamic List to the first cell of new row (From step 13) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_list_box".
Change Column Show to "DISPLAY_NAME".
Change Column Value to "DISPLAY_CODE".
Change Condition Value to "CATEGORY_CODE='SUP_PM_DECISION'".
Change FIELD_ID to "DECISION_SUP_PM".
Change ShowFieldName to "Supervisor/PM".
Click OK.
15. From Tools > Field drag Text Box to the second cell of new row (From step 13) The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Change FIELD_ID to "DECISION_SUP_PM_REMARK".
Change ShowFieldName to "Supervisor/PM Remark".
Change Alignment to "left".
Click OK.
16. From Leave Request Module click icon append row. The system will append new row to the table.
17. From Tools > Field drag Dynamic List to the first cell of new row (From step 16) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_list_box".
Change Column Show to "DISPLAY_NAME".
Change Column Value to "DISPLAY_CODE".
Change Condition Value to "CATEGORY_CODE='HEAD_DECISION''".
Change FIELD_ID to "DECISION_HEAD".
Change ShowFieldName to "One Down/Head".
Click OK.
18. From Tools > Field drag Text Box to the second cell of new row (From step 16) The textLabel shows.
Click icon pencil. The dialog of Text Box Configuration opens.
Change FIELD_ID to "DECISION_HEAD_REMARK".
Change ShowFieldName to "One Down/Head Remark".
Change Alignment to "left".
Click OK.
19. From Leave Request Module click icon append row. The system will append new row to the table.
20. From Tools > Field drag Dynamic List to the first cell of new row (From step 19) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_list_box".
Change Column Show to "DISPLAY_NAME".
Change Column Value to "DISPLAY_CODE".
Change Condition Value to "CATEGORY_CODE='HR_DECISION''".
Change FIELD_ID to "DECISION_HR".
Change ShowFieldName to "HR".
Click OK.
21. From Tools > Field drag Text Box to the second cell of new row (From step 19) The textLabel shows.
Click icon pencil. The dialog of Text Box Configuration opens.
Change FIELD_ID to "DECISION_HR_REMARK".
Change ShowFieldName to "HR Remark".
Change Alignment to "left".
Click OK.
22. From Leave Request Module click icon append row. The system will append new row to the table.
23. From Tools > Field drag Dynamic List to the first cell of new row (From step 22) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_list_box".
Change Column Show to "DISPLAY_NAME".
Change Column Value to "DISPLAY_CODE".
Change Condition Value to "CATEGORY_CODE='AUTHORIZE_DECISION' ".
Change FIELD_ID to "DECISION_AUTH".
Change ShowFieldName to "Authorize".
Click OK.
24 From Tools > Field drag Text Box to the second cell of new row (From step 22) The textLabel shows.
Click icon pencil. The dialog of Text Box Configuration opens.
Change FIELD_ID to "DECISION_AUTH_REMARK".
Change ShowFieldName to "Authorize Remark".
Change Alignment to "left".
Click OK.
25. From Leave Request Module click icon pencil. The system will show Module Configuration.
Add module key by put "REQUEST_ID" to Module Key, put "10" to KeyLen and put "REQUEST_ID_SEQ" to Sequence.
Click button plus(+).
Click OK.
26. From Tools > Tabs drag Normal Tab to the silver box under the table of main tab. The dialog of Add Tab data opens. Put "Normal Leave" to Title, select 1 column and then click Add. The Normal Leave tab show.
27 From Tools > Module drag 1-Many to the box under the Order Item tab.
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Normal Leave".
Change Table Name to "wf_leave_req_item(T)".
Click OK.
28. From Tools > Field drag Hidden to Module Normal Leave. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "LEAVE_ITEM_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Leave Item id".
Click OK.
29. From Tools > Field drag Hidden to Module Normal Leave. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "REQUEST_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request id".
Click OK.
30. From Tools > Field drag List Box to Module Normal Leave. The hiddenLabel shows.
Click icon pencil. The dialog of List Box Configuration opens.
Change FIELD_ID to "LEAVE_TYPE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Leave Type".
Change FieldGroup to "1".
Change Seq to "1". 30.6
h to "Y".
Change showSearchSeq to "10".
Change Aligement to "center".
Add value , Set Value = "Errand" , ShowName = "Errand Leave" , SEQ = "1".
Add value , Set Value = "Sick" , ShowName = "Sick Leave" , SEQ = "2".
Add value , Set Value = "Vacation" , ShowName = "Vacation Leave" , SEQ = "3".
Add value , Set Value = "Other" , ShowName = "Other" , SEQ = "4".
Click OK.
31. From Tools > Field drag Text Box to Module Normal Leave. The textLabel shows.
Click icon pencil. The dialog of Text Box Configuration opens.
Change FIELD_ID to "SPECIFY".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Specify".
Change FieldGroup to "1".
Change Seq to "2".
Switch ShowSearch to "Y".
Change showSearchSeq to "20".
Change Alignment to "left".
Click OK.
32. From Tools > Field drag Calendar to Module Normal Leave. The calendar shows.
Click icon pencil. The dialog of Date Configuration opens.
Change FIELD_ID to "START_DATE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Start Date".
Change FieldGroup to "2".
Change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "30".
Change Alignment to "center".
Click OK.
33. From Tools > Field drag Calendar to Module Normal Leave. The calendar shows.
Click icon pencil. The dialog of Date Configuration opens.
Change FIELD_ID to "END_DATE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "END Date".
Change FieldGroup to "2".
Change Seq to "2".
Switch ShowSearch to "Y".
Change showSearchSeq to "40".
Change Alignment to "center".
Click OK.
34. From Tools > Button drag Module Button to the white box under name of module Normal Leave.
Change buttonName to "Add".
Change Page Action to "SUB_SEARCH".
Change Button Action to "popupActionFlow('[MODULE_ID]')".
Click OK.
35. From Tools > Button drag Module Button to the white box under name of module Normal Leave.
Change buttonName to "Delete".
Change Page Action to "SUB_SEARCH".
Change Button Action to "[MODULE_ID]Delete()".
Click OK.
36. From Tools > Button drag Module Button to the white box under name of module Normal Leave.
Change buttonName to "Save".
Change Page Action to "UPDATE".
Change Button Action to "actionFormSubmit('insertMany','Y')".
Click OK
37. From Tools > Button drag Module Button to the white box under name of module Normal Leave.
Change buttonName to "Save".
Change Page Action to "INSERT".
Change Button Action to "actionFormSubmit('insertMany','Y')".
Click OK.
38. From Tools > Button drag Module Button to the white box under name of module Normal Leave.
Change buttonName to "Cancel".
Change Page Action to "UPDATE".
Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
39. From Tools > Button drag Module Button to the white box under name of module Normal Leave.
Change buttonName to "Cancel".
Change Page Action to "INSERT".
Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
40. From Normal Leave Module click icon pencil. The system will show Module Configuration.
Add module Key , Select Module Key = "REQUEST_ID" , Parent Key = "REQUEST_ID".
Click button plus(+).
Add module Key , Select Module Key = "LEAVE_ITEM_ID" , KeyLen = "10" , Sequence = "LEAVE_ITEM_ID_SEQ".
Click button plus(+).
Click OK.
41. From Tools > Tabs drag General Tab to behind tab Normal Leave (resemble step.28). The dialog of Add Tab data opens. Put "Replacementl Leave" to Title, select 1 column and then click Add. The Normal Leave tab show.
42. From Tools > Module drag 1-Many to the box under the Replacement Leave.
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Replacement Leave".
Change Table Name to "wf_leave_req_item(T)".
Click OK.
43. From Tools > Field drag Hidden to Module Replacement Leave. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "LEAVE_ITEM_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Leave Item Id".
Click OK.
44. From Tools > Field drag Hidden to Module Replacement Leave. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "REQUEST_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
Click OK.
45. From Tools > Field drag Calendar to Module Replacement Leave. The calendar shows.
Click icon pencil. The dialog of Date Configuration opens.
Change FIELD_ID to "WORK_DATE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Work Date".
Change FieldGroup to "1".
Change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "10".
Change Alignment to "center".
Click OK.
46From Tools > Field drag Text Box to Module Replacement Leave. The textLabel shows.
Click icon pencil. The dialog of Text Box Configuration opens.
Change FIELD_ID to "RW_NO".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "RW No".
Change FieldGroup to "2".
Change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "20".
Change Alignment to "center".
Click OK.
47. From Tools > Field drag Calendar to Module Replacement Leave. The calendar shows.
Click icon pencil. The dialog of Date Configuration opens.
Change FIELD_ID to "START_DATE".
Change ShowFieldName to "Leave Date".
Change FieldGroup to "3".
Change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "30".
Change Alignment to "center".
Click OK.
48. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.
Change buttonName to "Delete".
Change Page Action to "SUB_SEARCH".
Change Button Action to "[MODULE_ID]Delete()".
Click OK.
49. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.
Change buttonName to "Add".
Change Page Action to "SUB_SEARCH".
Change Button Action to "popupActionFlow('[MODULE_ID]')".
Click OK.
50. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.
Change buttonName to "Add".
Change Page Action to "INSERT".
Change Button Action to "actionFormSubmit('insertMany','Y')".
Click OK.
51. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.
Change buttonName to "Cancel".
Change Page Action to "INSERT". Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');
Click OK.
52. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.
Change buttonName to "Add".
Change Page Action to "UPDATE".
Change Button Action to "actionFormSubmit('insertMany','Y')".
Click OK.
53. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.
Change buttonName to "Cancel".
Change Page Action to "UPDATE".
Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
54. From Replacement Leave Module click icon pencil. The system will show Module Configuration.
Add module Key, Select Module Key = "LEAVE_ITEM_ID", KeyLen = "10", Sequence = "LEAVE_ITEM_ID_SEQ".
Click button plus(+).
Add module Key , Select Module Key = "REQUEST_ID" , Parent Key = "REQUEST_ID".
Click button plus(+).
Click OK.
55. From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Add".
Change Page Action to "ENTITY_SEARCH".
Change Button Action to "addEntity()".
Click OK.
56. From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Delete".
Change Page Action to "ENTITY_UPDATE".
Change Button Action to "deleteEntity()".
Click OK.
57. From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Cancel".
Change Page Action to "ENTITY_UPDATE".
Change Button Action to "cancelEntity()".
Click OK.
58. From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Cancel".
Change Page Action to "ENTITY_INSERT".
Change Button Action to "cancelEntity()".
Click OK.
59From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Save".
Change Page Action to "ENTITY_UPDATE".
Change Button Action to "saveEntity()".
Click OK.
60. From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Save".
Change Page Action to "ENTITY_INSERT".
Change Button Action to "saveEntity()".
Click OK.
61. From Tools > Button drag Entity Button to the white box under Leave Request Tab.
Change buttonName to "Search".
Change Page Action to "ENTITY_SEARCH".
Change Button Action to "searchResult()".
Click OK.