Custom Validation
I need to import values from an excel file into GP tables. Before importing them, I need to validate each row against a complicated set of rules.
How can I check each row in an excel file against values inside of a database table before running the rest of the smart connect map?
Part of the complicated set of rules will involve string manipulation on the values inside of excel.
Thanks
How can I check each row in an excel file against values inside of a database table before running the rest of the smart connect map?
Part of the complicated set of rules will involve string manipulation on the values inside of excel.
Thanks
Answers
If you want to do this before SmartConnect does anything, then you would need to create your own “tasks that run before the map”.
In it, you’d then have to write your own code to read the excel file directly and then iterate through the data yourself.
If you find an issue, you’d have to warn your users somehow and then return a “false” flag back to the task results so that the integration fails before it starts.
Your other option is that you could write a “before document” task in the SmartConnect map. So let SC read the excel data and then try to create a document – and then before it gets submitted to the destination -your calculation could throw an error and cancel the specific document but not the rest that might be ok.
This one is a lot easier since you then don’t have to read the data yourself.
In it, you’d then have to write your own code to read the excel file directly and then iterate through the data yourself.
If you find an issue, you’d have to warn your users somehow and then return a “false” flag back to the task results so that the integration fails before it starts.
Your other option is that you could write a “before document” task in the SmartConnect map. So let SC read the excel data and then try to create a document – and then before it gets submitted to the destination -your calculation could throw an error and cancel the specific document but not the rest that might be ok.
This one is a lot easier since you then don’t have to read the data yourself.
Thanks Patrick. I will have to think about this.