Skip to content
+1-888-319-3663

COMMUNITY FORUM

How to Make a Post-Map Task "Pay Attention" Only to Your Source Record

John Ellis asked 2 years ago
Hi:
Below, I have a T-SQL script that I composed for a post-map “Run SQL Command” Task.  The script is to simply update the SECSTATUS field of a SQL table to contain the word “RECEIVED”, as long as the criteria in the script is met.
Although this script works if I run it in SQL, it is not working in the Task.  Specifically, I receive “error converting the varchar value ‘RCT000123…’ to data type int.
SECSTATUS is not an int field – it’s a char field.  And, I don’t understand why the Task is trying to update the SECSTATUS field of my SQL table with the GP receipt number.
Someone told me that this is because I have not configured this task to pay attention only to the source record(s) being imported by my map.
How do I get the Task to focus only on the data that I’m importing?
Thanks!
John 
update INTEGRATION..RCPT set SECSTATUS = ‘RECEIVED’ where –FLAG IN (99, 98) and
ORDERID in (select VNDDOCNM from ZCMS..POP10300
INNER JOIN INTEGRATION..RCPT on ZCMS..POP10300.POPRCTNM = INTEGRATION..RCPT.ORDERID) 
AND LINEID in (select BOLPRONUMBER from ZCMS..POP10310
INNER JOIN INTEGRATION..RCPT on ZCMS..POP10310.BOLPRONUMBER = INTEGRATION..RCPT.LINEID) 
AND SECTION in (select REFRENCE from ZCMS..POP10300
INNER JOIN INTEGRATION..RCPT on ZCMS..POP10300.REFRENCE = INTEGRATION..RCPT.SECTION) 
 
 
Answers
Lorren Zemke answered 2 years ago
John,
At the point of Post Map, the process is done and SmartConnect no longer knows about the source data.
You can run a post document task and handle the process for each set of document data as they are being processed but there is no option at the end of the process after it’s done.
John Ellis answered 2 years ago
Thank you, Lorren!  I’ll work on that!
Good to hear from you!  🙂
John
John Ellis answered 2 years ago
Hi Lorren:
I placed the script on the post document Task and still got the error.  Are there any options?
John

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