Currently, in Workflow if you use an Insert Data activity it allows you to “check” create identity token so that you can access that identity token from a later activity. However, the custom query activity doesn’t allow a similar feature. This would be very helpful if there was some option that allowed us to do that.
I had to do in 6 activities what I might have been able to do in 2 (maybe 3). I need to a GUID which means I need to use a custom query so I can take advantage of SQL’s “newid()” function to create it. But Insert Data activities won’t accept SQL query functions, only values. Instead, I had to use the Insert Data activity and put in a placeholder for my GUID. Then query the identity record it created to get the Instance. Then use the Instance in a custom query to update the GUID. Then run another query to get the GUID it created.