How to set a specific queue item ID in get transaction data?


I have to process items in a queue in a different order and not by first in first out logic. So when this Q is created I use the reference field to have the information I want later on. Before processing I read the Q information using API and now I have a datatable with the queue information in the order I need to process. I now have to the pick up first item in the datatable so I take the item’s ID in the queue which is a string. how can I assign this as out transaction item manually? can you please help?