Autocreate a record from a result from dbquery

In a lot of cases in my flow scripts I have to query the database which returns a result array.

Then I have to map values from the result array into Record References. This requires me for each column in the result set to have to insert a String into the map step, -> over so its underneath the result array, then drag the map line over to the Record Reference’s associated field.

Is there some way I could auto-populate a record reference that maps exactly to the set of database columns? That way I won’t have to keep typing in and -> under the set of strings in the result set/array.

Does this make sense? Is there some better way to take rows from a DB and map them into Record Reference structures? The column names don’t match the names in the Record Reference (XSD schema), which is what usually forces the MAP steps.

Thanks for any ideas,


I assume that you know why you are running the query in each case. If so, then you can create a record set or series of recordsets (one for each query.) The record set should reside in a records folder. Then, under the results array, create a record reference to the record that you created. Then, you can instantiate another copy of the same record in the map, and then connect only the topmost node in the two records.

Hope this helps.


That’s ideally my goal, but is there some way I can create those records auto-matically? We have 100s of tables in our database schema, so its quite tiresome to have to type in all the column names by hand … thats really my dilemma, the typing all the column names by hand.

I’m currently messing with XML Spy… it does seem to have tools to talk to MS SQL Server (where my db is). Perhaps can create some XSD files from my schema …

Interesting query (pardon the pun)… Is it possible to dynamically create records?

My initial hunch is that you can map a results subnode to some generic record structure which you can node-iterate over to discover the elements/columns which you can then use to create an XML document… I wonder if there is a WmRoot service to handle “record creation”…

Sorry, just thinking out loud here. Let me sleep on this.

XML Spy did it! I exported our entire database schema into an XSD file

Now I can make a WM record out of any of the tables in our db schema by creating a new Record from this massive XSD and just choose whatever table I want as the root node.

Now I can just reference those schemas after I make my queries.

XML Spy makes a very handy tool to have along side WM.

Great, Mike. Glad you got it worked out. Sounds like a cool solution.