In this step you will replace the Date Acquired column in the employee skills list (EMPSKLS) with field STD_DATEX. This is a Date type field and has a default visualization of a Date Picker weblet.
Note: The default Date Picker visualization for field STD_DATEX will be automatically implemented when the field is included on the page, or is a column in a simple list weblet. |
When used as a column in the Grid weblet the default visualization is not recognised and you will need to add the jQuery UI DatePicker weblet to this column.
Def_List Name(#empskls) Fields(#SKILCODE #GRADE #COMMENT #std_datex (#dateacqr *hidden) (#empno *hidden) (#dateacq *hidden)) Type(*Working) Entrys(*max)Note: The virtual field DATEACQ will still be required in the list to update the employee skills record. The real field DATEACQR cannot be used for update. |
When (= D)#tabindex := '1'Fetch Fields(#empdata) From_File(pslmst) With_Key(#empno)Clr_List Named(#empskls)Select Fields(#empskls) From_File(pslskl) With_Key(#empno)#std_datex := #dateacq.asdate( SYSFMT6 )
Add_Entry To_List(#empskls)Endselect
When (= N)#tabindex := '2'#skl_list := *default#std_datex := #std_datex.Now
#grade := P
Add_Entry To_List(#empskls) After(*START)Message Msgtxt('Complete new skill in top row')
When (= S)#tabindex := '2'Selectlist Named(#empskls)#dateacq := #std_datex.asnumber( DDMMYY )If (#dateacqr *NE *zeroes)Update Fields(#empskls) In_File(pslskl) With_Key(#empno #skilcode) Val_Error(*next)If_Status Is_Not(*okay)Message Msgtxt('Errors occurred on skills updates')EndifElseInsert Fields(#empskls) To_File(pslskl) Val_Error(*next)If_Status Is_Not(*okay)Message Msgtxt('Insert failed')ElseMessage Msgtxt('Skills for ' + #empno + ' were changed')EndifEndifEndselectOverride Field(#std_datex) Colhdg('Date' 'Acquired' '')

