Learn about step to create entity for requester who need to make leave request.

Procedure

  1. From ONEWEB App Designer screen, click Entities > Create New Entity and then click OK on the popup dialog. The new entity name is "Entity Name" opens.


  1. Edit entity name by click Entity Properties (icon pencil)
    1. Change Entity name to "Doc Leave Request".
    2. Change Tab Condition to "Y".
    3. Click OK.


  1. 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, select 1 Column and then click Add.


  1. From Tools > Module drag 1-1 to the box under the Leave Request tab.
    1. Click icon pencil. The dialog of Module Configuration opens.
    2. Change Module Name to "Leave Request".
    3. Change Table Name to "wf_service_request (T)".
    4. 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'".

    1. Click OK.
    2. Click icon Configuration Layout and the dialog opens.
    3. Select 2 Column and then click Accept. The table that has 2 columns will show.


  1. From Tools > Field drag Text Box to the first cell of the table. (From step 4) The textLabel shows.
    1. Click icon pencil. The dialog of Text box Configuration opens.
    2. Put "readonly" to Source tag.
    3. Change FIELD_ID to "REQUEST_ID".
    4. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
    5. Switch ShowSearch to "Y".
    6. Change showSearchSeq to "1".
    7. Change Alignment to "center".  
    8. Click OK.


  1. From Tools > Field drag Text Box to the first cell of the table. (From step 4.6) The textLabel shows.
    1. Click pencil icon. The dialog of Text box Configuration opens.
    2. Change FIELD_ID to "REQUESTER".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Requester".
    4. Switch SearchCriteria to "Y".
    5. Switch ShowSearch to "Y".
    6. Switch searchPreLike to "Y".
    7. Switch searchLike to "Y".
    8. Switch searchIgnoreCase to "Y".
    9. Change Search FieldGroup to "1".
    10. Change SearchCriteriaSeq to "1".
    11. Change showSearchSeq to "2".
    12. Change Alignment to "left".  
    13. Click OK.


  1. From Leave Request Module click icon append row. The system will append new row to the table.


  1. From Tools > Field drag Dynamic List to the first cell of new row (From step 7) The dropdownLabel shows.
    1. Click icon pencil. The dialog of Dynamic List Box Configuration opens.
    2. Change Table Name to "wf_ms_sub_request_type".
    3. Change Column Show to "SUB_REQ_NAME".
    4. Change Column Value to "SUB_REQ_TYPE_ID".
    5. Change Condition Value to "request_type='04'".
    6. Change FIELD_ID to "SUB_REQUEST_TYPE".
    7. Change ShowFieldName to "Leave Type".  
    8. Switch SearchCriteria to "Y".
    9. Switch ShowSearch to "Y".
    10. Change Search FieldGroup to "1".
    11. Change SearchCriteriaSeq to "2".
    12. Change showSearchSeq to "3".
    13. Change Alignment to "left".
    14. Click OK.
  2. From Tools > Field drag Dynamic List to the second cell of new row (From step 8) The dropdownLabel shows.
    1. Click icon pencil. The dialog of Dynamic List Box Configuration opens.
    2. Change Table Name to "wf_ms_project".
    3. Change Column Show to "PROJECT_NAME".
    4. Change Column Value to "PROJECT_ID".
    5. Change FIELD_ID to "PROJECT".
    6. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Project".
    7. Change Alignment to "right".  
    8. Click OK.        


  1. From Leave Request Module click icon append row. The system will append new row to the table.


  1. From Tools > Field drag Text Area to the first cell of new row (From step 10) The textareaLabel shows.
    1. Click icon pencil. The dialog of Text Area Configuration opens.
    2. Change FIELD_ID to "CONTACT_INFO".
    3. Change ShowFieldName to "Contact/Tel.".
    4. Change Alignment to "left".  
    5. Click OK.


  1. From Tools > Field drag Hidden to the second cell of new row (From step 10) The hiddenLabel shows.
    1. Click icon pencil. The dialog of Hidden Field Configuration opens.
    2. Change Defultvalueto "04".
    3. Change FIELD_ID to "REQUEST_TYPE".
    4. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "RequestType".
    5. Click OK.        


  1. From Leave Request Module click icon append row. The system will append new row to the table.


  1. From Tools > Field drag Dynamic List to the first cell of new row (From step 13) The dropdownLabel shows.
    1. Click icon pencil. The dialog of Dynamic List Box Configuration opens.
    2. Change Table Name to "wf_ms_list_box".
    3. Change Column Show to "DISPLAY_NAME".
    4. Change Column Value to "DISPLAY_CODE".
    5. Change Condition Value to "CATEGORY_CODE='SUP_PM_DECISION'".
    6. Change FIELD_ID to "DECISION_SUP_PM".
    7. Change ShowFieldName to "Supervisor/PM".
    8. Click OK.


  1. From Tools > Field drag Text Box to the second cell of new row (From step 13) The textLabel shows.
    1. Click icon pencil. The dialog of Text box Configuration opens.
    2. Change FIELD_ID to "DECISION_SUP_PM_REMARK".
    3. Change ShowFieldName to "Supervisor/PM Remark".
    4. Change Alignment to "left".  
    5. Click OK.


  1. From Leave Request Module click icon append row. The system will append new row to the table.


  1. From Tools > Field drag Dynamic List to the first cell of new row (From step 16) The dropdownLabel shows.
    1. Click icon pencil. The dialog of Dynamic List Box Configuration opens.
    2. Change Table Name to "wf_ms_list_box".
    3. Change Column Show to "DISPLAY_NAME".
    4. Change Column Value to "DISPLAY_CODE".
    5. Change Condition Value to "CATEGORY_CODE='HEAD_DECISION''".
    6. Change FIELD_ID to "DECISION_HEAD".
    7. Change ShowFieldName to "One Down/Head".
    8. Click OK.


  1. From Tools > Field drag Text Box to the second cell of new row (From step 16) The textLabel shows.
    1. Click icon pencil. The dialog of Text Box Configuration opens.
    2. Change FIELD_ID to "DECISION_HEAD_REMARK".
    3. Change ShowFieldName to "One Down/Head Remark".
    4. Change Alignment to "left".
    5. Click OK.


  1. From Leave Request Module click icon append row. The system will append new row to the table.


  1. From Tools > Field drag Dynamic List to the first cell of new row (From step 19) The dropdownLabel shows.
    1. Click icon pencil. The dialog of Dynamic List Box Configuration opens.
    2. Change Table Name to "wf_ms_list_box".
    3. Change Column Show to "DISPLAY_NAME".
    4. Change Column Value to "DISPLAY_CODE".
    5. Change Condition Value to "CATEGORY_CODE='HR_DECISION''".
    6. Change FIELD_ID to "DECISION_HR".
    7. Change ShowFieldName to "HR".
    8. Click OK.


  1. From Tools > Field drag Text Box to the second cell of new row (From step 19) The textLabel shows.
    1. Click icon pencil. The dialog of Text Box Configuration opens.
    2. Change FIELD_ID to "DECISION_HR_REMARK".
    3. Change ShowFieldName to "HR Remark".
    4. Change Alignment to "left".  
    5. Click OK.


  1. From Leave Request Module click icon append row. The system will append new row to the table.


  1. From Tools > Field drag Dynamic List to the first cell of new row (From step 22) The dropdownLabel shows.
    1. Click icon pencil. The dialog of Dynamic List Box Configuration opens.
    2. Change Table Name to "wf_ms_list_box".
    3. Change Column Show to "DISPLAY_NAME".
    4. Change Column Value to "DISPLAY_CODE".
    5. Change Condition Value to "CATEGORY_CODE='AUTHORIZE_DECISION' ".
    6. Change FIELD_ID to "DECISION_AUTH".
    7. Change ShowFieldName to "Authorize".
    8. Click OK.


  1. From Tools > Field drag Text Box to the second cell of new row (From step 22) The textLabel shows.
    1. Click icon pencil. The dialog of Text Box Configuration opens.
    2. Change FIELD_ID to "DECISION_AUTH_REMARK".
    3. Change ShowFieldName to "Authorize Remark".
    4. Change Alignment to "left".  
    5. Click OK.


  1. From Leave Request Module click icon pencil. The system will show Module Configuration.
    1. Add module key by put "REQUEST_ID" to Module Key, put "10" to KeyLen and put "REQUEST_ID_SEQ" to Sequence.  
    2. Click button plus(+).
    3. Click OK.


  1. 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.


  1. From Tools > Module drag 1-Many to the box under the Order Item tab.
    1. Click icon pencil. The dialog of Module Configuration opens.
    2. Change Module Name to "Normal Leave".
    3. Change Table Name to "wf_leave_req_item(T)".
    4. Click OK.


  1. From Tools > Field drag Hidden to Module Normal Leave. The hiddenLabel shows.
    1. Click icon pencil. The dialog of Hidden Field Configuration opens.
    2. Change FIELD_ID to "LEAVE_ITEM_ID".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Leave Item id".
    4. Click OK.


  1. From Tools > Field drag Hidden to Module Normal Leave. The hiddenLabel shows.
    1. Click icon pencil. The dialog of Hidden Field Configuration opens.
    2. Change FIELD_ID to "REQUEST_ID".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request id".
    4. Click OK.


  1. From Tools > Field drag List Box to Module Normal Leave. The hiddenLabel shows.
    1. Click icon pencil. The dialog of List Box Configuration opens.
    2. Change FIELD_ID to "LEAVE_TYPE".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Leave Type".
    4. Change FieldGroup to "1".
    5. Change Seq to "1".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "10".
    8. Change Aligement to "center".
    9. Add value , Set Value = "Errand" , ShowName = "Errand Leave" , SEQ = "1".
    10. Add value , Set Value = "Sick" , ShowName = "Sick Leave" , SEQ = "2".
    11. Add value , Set Value = "Vacation" , ShowName = "Vacation Leave" , SEQ = "3".
    12. Add value , Set Value = "Other" , ShowName = "Other" , SEQ = "4".
    13. Click OK.


  1. From Tools > Field drag Text Box to Module Normal Leave. The textLabel shows.
    1. Click icon pencil. The dialog of Text Box Configuration opens.
    2. Change FIELD_ID to "SPECIFY".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Specify".
    4. Change FieldGroup to "1".
    5. Change Seq to "2".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "20".
    8. Change Alignment to "left".  
    9. Click OK.


  1. From Tools > Field drag Calendar to Module Normal Leave. The calendar shows.
    1. Click icon pencil. The dialog of Date Configuration opens.
    2. Change FIELD_ID to "START_DATE".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Start Date".
    4. Change FieldGroup to "2".
    5. Change Seq to "1".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "30".
    8. Change Alignment to "center".  
    9. Click OK.


  1. From Tools > Field drag Calendar to Module Normal Leave. The calendar shows.
    1. Click icon pencil. The dialog of Date Configuration opens.
    2. Change FIELD_ID to "END_DATE".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "END Date".
    4. Change FieldGroup to "2".
    5. Change Seq to "2".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "40".
    8. Change Alignment to "center".  
    9. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Normal Leave.    
    1. Change buttonName to "Add".
    2. Change Page Action to "SUB_SEARCH".
    3. Change Button Action to "popupActionFlow('[MODULE_ID]')".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Normal Leave.    
    1. Change buttonName to "Delete".
    2. Change Page Action to "SUB_SEARCH".
    3. Change Button Action to "[MODULE_ID]Delete()".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Normal Leave.    
    1. Change buttonName to "Save".
    2. Change Page Action to "UPDATE".
    3. Change Button Action to "actionFormSubmit('insertMany','Y')".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Normal Leave.    
    1. Change buttonName to "Save".
    2. Change Page Action to "INSERT".
    3. Change Button Action to "actionFormSubmit('insertMany','Y')".
    4. Click OK.


  1. rom Tools > Button drag Module Button to the white box under name of module Normal Leave
    1. Change buttonName to "Cancel".
    2. Change Page Action to "UPDATE".
    3. Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Normal Leave.  
    1. Change buttonName to "Cancel".
    2. Change Page Action to "INSERT".
    3. Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
    4. Click OK.


  1. From Normal Leave Module click icon pencil. The system will show Module Configuration.
    1. Add module Key , Select Module Key =  "REQUEST_ID" , Parent Key = "REQUEST_ID".
    2. Click button plus(+).
    3. Add module Key , Select Module Key =  "LEAVE_ITEM_ID" , KeyLen = "10" , Sequence = "LEAVE_ITEM_ID_SEQ".
    4. Click button plus(+).
    5. Click OK.


  1. 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.


  1. From Tools > Module drag 1-Many to the box under the Replacement Leave.
    1. Click icon pencil. The dialog of Module Configuration opens.
    2. Change Module Name to "Replacement Leave".
    3. Change Table Name to "wf_leave_req_item(T)".
    4. Click OK.


  1. From Tools > Field drag Hidden to Module Replacement Leave. The hiddenLabel shows.
    1. Click icon pencil. The dialog of Hidden Field Configuration opens.
    2. Change FIELD_ID to "LEAVE_ITEM_ID".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Leave Item Id".
    4. Click OK.


  1. From Tools > Field drag Hidden to Module Replacement Leave. The hiddenLabel shows.
    1. Click icon pencil. The dialog of Hidden Field Configuration opens.
    2. Change FIELD_ID to "REQUEST_ID".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
    4. Click OK.


  1. From Tools > Field drag Calendar to Module Replacement Leave. The calendar shows.
    1. Click icon pencil. The dialog of Date Configuration opens.
    2. Change FIELD_ID to "WORK_DATE".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Work Date".
    4. Change FieldGroup to "1".
    5. Change Seq to "1".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "10".
    8. Change Alignment to "center".  
    9. Click OK.


  1. From Tools > Field drag Text Box to Module Replacement Leave. The textLabel shows.
    1. Click icon pencil. The dialog of Text Box Configuration opens.
    2. Change FIELD_ID to "RW_NO".
    3. Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "RW No".
    4. Change FieldGroup to "2".
    5. Change Seq to "1".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "20".
    8. Change Alignment to "center".  
    9. Click OK.


  1. From Tools > Field drag Calendar to Module Replacement Leave. The calendar shows.
    1. Click icon pencil. The dialog of Date Configuration opens.
    2. Change FIELD_ID to "START_DATE".
    3. Change ShowFieldName to "Leave Date".
    4. Change FieldGroup to "3".
    5. Change Seq to "1".
    6. Switch ShowSearch to "Y".
    7. Change showSearchSeq to "30".
    8. Change Alignment to "center".
    9. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.            
    1. Change buttonName to "Delete".
    2. Change Page Action to "SUB_SEARCH".
    3. Change Button Action to "[MODULE_ID]Delete()".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.            
    1. Change buttonName to "Add".
    2. Change Page Action to "SUB_SEARCH".
    3. Change Button Action to "popupActionFlow('[MODULE_ID]')".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.            
    1. Change buttonName to "Add".
    2. Change Page Action to "INSERT".
    3. Change Button Action to "actionFormSubmit('insertMany','Y')".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.            
    1. Change buttonName to "Cancel".
    2. Change Page Action to "INSERT".
    3. Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.            
    1. Change buttonName to "Add".
    2. Change Page Action to "UPDATE".
    3. Change Button Action to "actionFormSubmit('insertMany','Y')".
    4. Click OK.


  1. From Tools > Button drag Module Button to the white box under name of module Replacement Leave.            
    1. Change buttonName to "Cancel".
    2. Change Page Action to "UPDATE".
    3. Change Button Action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
    4. Click OK.


  1. From Replacement Leave Module click icon pencil. The system will show Module Configuration.
    1. Add module Key, Select Module Key = "LEAVE_ITEM_ID", KeyLen = "10", Sequence = "LEAVE_ITEM_ID_SEQ".
    2. Click button plus(+).
    3. Add module Key , Select Module Key =  "REQUEST_ID" , Parent Key = "REQUEST_ID".
    4. Click button plus(+).
    5. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Add".
    2. Change Page Action to "ENTITY_SEARCH".
    3. Change Button Action to "addEntity()".
    4. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Delete".
    2. Change Page Action to "ENTITY_UPDATE".
    3. Change Button Action to "deleteEntity()".
    4. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Cancel".
    2. Change Page Action to "ENTITY_UPDATE".
    3. Change Button Action to "cancelEntity()".
    4. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Cancel".
    2. Change Page Action to "ENTITY_INSERT".
    3. Change Button Action to "cancelEntity()".
    4. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Save".
    2. Change Page Action to "ENTITY_UPDATE".
    3. Change Button Action to "saveEntity()".
    4. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Save".
    2. Change Page Action to "ENTITY_INSERT".
    3. Change Button Action to "saveEntity()".
    4. Click OK.


  1. From Tools > Button drag Entity Button to the white box under Leave Request Tab.    
    1. Change buttonName to "Search".
    2. Change Page Action to "ENTITY_SEARCH".
    3. Change Button Action to "searchResult()".
    4. Click OK.