Skip to content
+1-888-319-3663

COMMUNITY FORUM

_F1 is not declared

Jae asked 2 years ago
Hello,
 
I have a .txt file as the source file without any header information and have it mapped to GP’s manual checks. I do have a task script to apply the payment to an invoice as referenced in this article. https://www.eonesolutions.com/applying-payables-documents-in-smartconnect-integrations/ 
The message I keep getting when attempting to run the map is, “Error in restriction:’_F1′ is not declared. It may be inaccessible due to its protection level.”
I’m not sure how to resolve this error as I don’t have a F1 header showing up in my Source Columns. Any advice would be great appreciated!
Also, if someone has a sample script to get one payment to apply towards multiple invoices….that would be extremely helpful as well!
 
Thank you in advance,
JC
 
Answers
Patrick Roth Staff answered 2 years ago
“I’m not sure how to resolve this error as I don’t have a F1 header showing up in my Source Columns”

Well, that WOULD be your issue.
You created a restriction on the map and referenced _F1 (because you don’t have headers).  Then at some point you must have found you could rename your columns in ODBC to be meaningful and so you renamed “F1” to maybe “Customer”.
But your script in the restriction on one of your mappings still says “_F1” and so it fails.
Open all your restrictions and remove this line or more likely switch the variable to be the proper name.
“Also, if someone has a sample script to get one payment to apply towards multiple invoices….that would be extremely helpful as well!”
We do not at this time.  Because this is an “after document” script, your script task only runs the once.  But you would have to keep a list of all the apply documents and amounts, and date and whatever else you need somehow.
You could, for example, on that restriction script write that information into a SQL temp table that you create.
Then in the after document script, you would read that table back again and loop through the resultset and apply them one by one.  Then finished, remove the records.
 
 
Jae answered 2 years ago
Hi Patrick,
I just realized my colleague had set one up. I will try your suggestion and go from there. Thanks for the quick reply!
-JC

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