Hello Team,
I am using DB Writer to write rows to table. I have “Write Status” enabled. How to trap that in a variable and see if it has 0 or something to see any error occurred.
DB Writer has “Fail on Error” but I think I want to move to next step to trap that error … More like “ON ERROR RESUME NEXT” in VBA programming.
I have 3 different writers to post data to tables and want to send summarized email if there are any issues in any of the node.
I was trying IF Switch, Table Row to Variable, to Text Output …
But it captures different values… I want to see node name and any issue in the node …
If there is no error, that node details won’t be part of the email.
I can give you some suggestions and then you can see if it makes sense. So regarding DB Writer node, I would un-check Fail on Error (so you don’t fail and continue with insertion of rows that are fine) and check Append write status columns to have error message in table. Then you need logic to add node name to error messages, if any of course so prior to adding that filter your table based on missing values in WriteError column. There will be missing value if row was successfully inserted otherwise there will be error message. To add node name I would use Constant Value Column with hard-coded value (MM_Sales2DB I guess for upper branch). Then Concatenate tables from all three branches and use Empty Table Switch to see if table is empty (which will happen in case there is no errors in any branch) not to send email (although I would send email in this case as well saying “everything went fine” and “successfully inserted xyz rows in this table…”) or otherwise send email. For sending table in a mail check this example.
If I remember well this was already discussed on forum so might wanna use search for other ideas as well