Get values from multi column list view
New DiscussionGood morning,
I have a control showing as a SwfListView in our application. The list has 2 columns. I can get the item count with the code below and the value of the first column. How do I get the associated value in the 2nd column?
'Build the output sheet to see what we have for values
sheetNameOutputData = "Output Data"
DataTable.AddSheet(sheetNameOutputData)
Set DTOuptputData = DataTable.GetSheet(sheetNameOutputData)
'Create the columns
columnName = "Value"
EmpltyData = ""
EmptyData = DTOuptputData.AddParameter(columnName, "").Name
var_GetItemsCount = SwfWindow("Summit FT Diagnostics").SwfListView("environmentListView").GetItemsCount()
For loopItems = 1 to var_GetItemsCount
'Set the output row
DTOuptputData.SetCurrentRow(loopItems)
strItemValue = SwfWindow("Summit FT Diagnostics").SwfListView("environmentListView").GetItem(loopItems – 1) 'Subtract 1 since index starts with zero
'Output the data
DTOuptputData.GetParameter(columnName).Value = strItemValue
Next
'Header in the object show 2 columns
var_GetColumnHeader = SwfWindow("Summit FT Diagnostics").SwfListView("environmentListView").GetColumnHeader(1)
Regards,
Brian Washburn