Search a value inside of a queue

I have a problem with a TouchTable. I’m getting IDs and X and Y values. I’m always getting the values from one Touch at a time. If 5 fingers are touching and remain on the touchscreen, the values change, first the first, then the second, 3,4,5 and again first, second, …
What stays is the id per “finger” as long it is not liftet…
I always need to know if the id was there already and what x and y values I had at this point, for moving the thing which was at the last point.

I thought about putting all 3 values in 3 different queues, that works. And my next step I thought about, that if theres a new ID, check the ID queue, if the ID is already in the queue, then get the slice number and Get the value at the same slice from the x and y queue. Then move what is at that point.

How can I do a search for the ID in a queue? I just can’t figure out how to do that.

may be this Tracking Tutorial is helpful.

have a closed look at the contained ‘GetID (Fiducial)’ module.