In your poly~ patch, trigger a bang off of the input to the patch. Send this bang to a thispoly~ object. The thispoly~ object will output its instance number. From there, you can send that instance number to a send object. Put the corresponding receive object in the main patch, and you will get the most current instance number out of it each time something is triggered. If you don't need the instance number every time, then you can send the output of the thispoly~ object to a value object, which will store the most recent value. Then in your main patch, when you need to know the most recently triggered instance, just query another value object (with the same name) and it'll tell you.
By the way, if you're using the "note" or "midinote" messages to send notes into the poly~ patch, then that (by definition) is going to cause your "target" messages to be ignored. The whole point of using note and midinote is to let the poly~ object decide which voice to target based on which ones are busy. If you want to choose which voices to target yourself, then just send the target message, and send the note information through an inlet without any note or midinote message before it.