how to read the excel data using foreach loop container even if the task is failed inside the loop

  • I am reading the data from the excel and using for each loop container i have executed some post migration steps.

    My problem is the excel having multiple rows. container failed when the task is getting failed. i want to continue to next row from the excel even if the task is failed in the container.

    please any one help me....

  • What is the error message you are getting? also, why this task is failing?

    Does the excel file is having any invalid records or something?

    ____________________________________________________________

    AP
  • Enable the OnError event handlers for the steps in your container, then on the event handlers pane, under variables click the icon to show system variables (a grey box with the expression X in it) and change 'Propogate' to 'False'. (It might also be a good idea to send any failed rows to a new Excel file so you can check them out). Now the loop shouldn't fail based on the contained tasks.

    If you explain exactly what you're doing, what the error is caused by etc someone would be able to suggest a better solution.

  • Thanks for your help, Now its working fine as i expected. But i try to send those errors using send mail task for this i have take send mail task. Previously its working fine. but after this change has been done its not working.

    Please provide any recomedations..

  • Are you using the send mail task on the loop container itself? If so, you will need to attach them to the individual step(s) within the loop, as of course now the loop itself is not failing. If you have quite a few tasks within the loop, you can put all these in a sequence container, rather than attaching one to every single step. (Note that if you do this you will need to change the propagate properties back, and then set them to FALSE just for the sequence container.)

  • Maybe you can also use a boolean variable

    You put to True when there is at least one error on the Loop Container

    And check this variable outside the container to figure out whether or not sending an email alert

    :w00t: !!!GOOGLE IS YOUR BEST FRIEND!!! :w00t:

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply