Sub AnimateGreeting
' Build ScrollText from Work Orders ----------------------------------------------------
SQLText = "SELECT * FROM wolist ORDER BY wrkordnbr DESC "
wList = DBUtils.ExecuteMemoryTable(SQL1,SQLText,Null,0)
If wlist.size = 0 Then Return
ScrollText = ""
Dim cs As CSBuilder
cs.Initialize
For i = 0 To wList.Size - 1
wRecord = wList.Get(i)
wMap = MapWORecord(wRecord)
ScrollText = cs.Color(Colors.Gray).Append(" " & wMap.Get("wrkordnbr") & " ")
If s.Val(wMap.Get("priority")) = "0" Then
ScrollText = cs.Color(Colors.Red).Append("URGENT ") ' does not change color to red?
End If
ScrollText = cs.Append(wMap.Get("servsitename"))
Next
ScrollText = cs.Append("").PopAll
' Start Scrolling ----------------------------------------------------------------------
ScrollingLabels.Initialize
slGreeting.Initialize("slGreeting")
slGreeting.TextColor = Colors.Gray
slGreeting.TextSize = 20
Activity.AddView(slGreeting,20dip,45dip,570dip,50dip)
ScrollingLabels.StartScrolling(slGreeting,ScrollText,True,scrollSpeed,Null,Colors.RGB(248,248,255))
End Sub