Setting the back color based on array value

I am in need of setting 30 dots back color based on the last 30 items that went by a sensor. I would like to create an array from a db table and set the color. It’s basically a color log of events. The 30 item drops off every time a new one is added. The array docs show some examples. Am I on the right track?

Yes. You are describing a queue. You can implement that in Xojo by using the array AddAt and RemoveAt methods. See Arrays — Xojo documentation

It’s basically

myarray.AddAt(0, value)