The quickest way would be to define a new summary field that uses the new "List Of" option that points to your ID field. Just set your global to the value of that summary field and you've got an instant list of IDs based on the found set.
Javier, additionally, please be aware that your 1st solution will not work correctly in a multi-user environment. If 2 users at the same time are marking different records, their list of ID's will not be what they expect.
Thanks for your advice, Jeroen.
Anyway, I am using a summary field with the "List of" option.