Article Details
| Id: | 17161 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 3.03.03 |
| Opened: | 13/07/2020 |
| Closed: | 13/07/2020 |
| Released: | 01/10/2020 |
| Job: | J024610 |
Business Layer; ISCodeDescriptionList objects can now be populated from a DataTable
The following function has been added to the ISCodeDescriptionList Class: FromDataTable(dataTable, Code, Description)
This allows a Code Description List to be populated from two columns of a DataTable.
An example of how this may be used is demonstrated below.
Public Function Main(parameters As ISKeyValueList) As BooleanDim CodeDescriptionList As ISCodeDescriptionList' Assume SuccessMain = True' InitialiseCodeDescriptionList = finBL.Runtime.CreateCodeDescriptionList()' Populate List with US StatesIf CodeDescriptionList.FromDataTable(finBL.Addressing.GetStatesDataTable("US"), "Code", "Description") ThenfinBL.DebugPrint(CodeDescriptionList.ToJsonString())ElseMain = FalseEnd IfEnd Function