Skip to content
+1-888-319-3663

COMMUNITY FORUM

Global Variable from SQL query

JosephMarkovich asked 9 years ago
I am trying to understand how to assign a result of a SQL query to a global variable to use in other processing. In GP, we use the Next Numeric add-on from EthoTech and I am using a SQL query in a task that runs before the document to get the next customer ID and save to a global variable to use in creating a customer in GP. The global variable is blank every time. Am I using this feature incorrectly to get the next number and use it for the map? Thank you. -Joe
Answers
Best Answer
lorren answered 9 years ago
Joe,

If you have the your SQL Query on the "Tasks that run before the document", this is done after all of the data has been gathered and transformed but before it is actually sent to the data source. So if you are trying to use the global variable in your mapping it will be blank.

If you need this to run on each document you would need to make it a .NET script (calculated field) and map the result of that .NET script to your document number field.


Lorren

If you would like to submit an answer or comment, please sign in to the eOne portal.