Page History
...
Group_By Name(#MyEmployee) Fields(#xEmployeeIdentification #xEmployeeSurname #xEmployeeGivenNames)
Mthroutine Name(UpdateEmployee)
* Define the Server Module routine used to update data on the server
Define_Com Class(#MyServerModule.UpdateEmployee) Name(#UpdateEmp)
* Update the data asynchronously
#UpdateEmp.ExecuteAsync Status(#io$sts) Employeedetails(#MyEmployee)
Evtroutine Handling(#UpdateEmp.Completed)
* Insert any processing after completion
Endroutine
Evtroutine Handling(#UpdateEmp.Failed) Handled(#handled)
* Handle failure
Endroutine
Endroutine
In the Server Module, the corresponding code might be something like this:
...
* Locally defined list
Def_List Name(#EmployeeList) Fields(#xEmployeeIdentification #xEmployeeSurname #xEmployeeGivenNames #xEmployeeStreet #xEmployeeCity #xEmployeeState #xEmployeePostalCode #xEmployeeCountry #xEmployeeHomeTelephone #xEmployeeBusinessTelephone #xEmployeeMobilePhone #xEmployeeSalary #xEmployeeStartDate #xEmployeeTerminationDate #xEmployeeDepartmentCode) Type(*working) Entrys(*MAX)
Mthroutine Name(GetEmployees)
* Define the Server Module method routine
Define_Com Class(#MyServerModule.GetEmployees) Name(#GetEmps)
* Return data into locally defined list
#GetEmps.ExecuteAsync( #EmployeeList )
Endroutine
Alternately the data could be mapped directly into a data object collection by replacing the DEF_LIST with something like this:
...
* Collection of Employee Items that acts as a list
Define_Com Class(#Prim_acol<#MyEmployeeData>) Name(#EmployeeList)
The associated reusable part, MyEmployeeData, would again need to have the corresponding fields included to ensure all the list data is available on the client.
...