Sub Process_Globals
Type Item (Name As String, Id As Int, Description As String)
Private AllItems As Map 'should be in the starter service
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
AllItems.Initialize 'should be in the starter service
For i = 1 To 100
Dim Item As Item
Item.Initialize
Item.Id = i
Item.Name = "Item #" & i
Item.Description = "sadasdasd"
AllItems.Put(Item.Name, Item)
Next
End If
Dim selected As List = SelectItems
Log(selected)
End Sub
Sub SelectItems As List
Dim res As List
res.Initialize
Dim m As Map
m.Initialize
For Each name As String In AllItems.Keys
m.Put(name, False)
Next
InputMap(m, "Select items")
For Each name As String In m.Keys
If m.Get(name) = True Then res.Add(AllItems.Get(name))
Next
Return res
End Sub