Is not very clear what you are trying to do, can you give an example?
It looks like you are looking for if there are any "progressbar.ID" that exists that matches the BuildCard.UID and if there is not any then create one progress bar and set the ID to the BuildCard.UID
Is that correct?
If yes you can do
For each BuildCard
Subevent: "progressbar.ID" = BuildCard.UID
Subevent: Else = Create "progressbar" and set "progressbar.ID" to the BuildCard.UID