List Items

davelt99

Member
Licensed User
Longtime User
I have a list that is being populated by a
Type Merchant(id as int,company as string,city as string)

I can't figure out how to get, for example, the city name from index 2 or the third row of the list.

Any help would be greatly appreciated.

Thank you
 
I have a list that is being populated by a
Type Merchant(id as int,company as string,city as string)

I can't figure out how to get, for example, the city name from index 2 or the third row of the list.

Any help would be greatly appreciated.

Thank you

Code: Copy
Dim myMerchant as Merchant
myMerchant = myMerchantList.Get(2)
Log(myMerchant.City)
 
Upvote 0
A list stores data as objects so you have to tell it how you want to treat the data.

You need to do

Code: Copy
Dim MyType As Merchant

MyType = Listname.get(index)

Then you can acces it as you would expect:

Code: Copy
MyType.company
etc.

[Edit] Beaten to it!
 
Last edited:
Upvote 0
Back
Top