So - you would need to first submit the form, then query for the data for this form, then you would have the ID. When you set up a library data connection to query data in a form, you have the option to query for data "for this form only" but I suspect that only works when the form is being opened from the library. Might be worth experimenting with. Otherwise, you could add some unique value to the form (userName function + now function should do the trick) and promote that column to the library. Then, after you submit the form, set the query field in a data connection to the library to that unique ID and query the library - you should get back just the form you've now submitted - and can then use the ID in the email. Hopefully that makes sense?
Hilary Stoupa
