System.reflection.targetinvocationexception during assign activity

Hi All
while performing assign activity, i m getting below error:
There is no validation error in code. Please help to resolve the issue.


is this assign activity been used within any LOOP
can i have a view on full structure of workflow if possible with a screenshot
Cheers @Anamika15

Hi @Palaniyappan
Company Info.xaml (22.3 KB)
Attached is the .xaml file for your reference. Please check and let me know the issue.
Its working fine for 2-3 row items and then it is throwing the exception.

If this works for a couple of rows and then breaks, will have to be cause of the value you are trying to assign to the column will eventually be wrong, you need to put a break point in that assign and look at that value when it errors out.

When I am printing the output in a message box, its giving the correct result. But during the Assign Address activity only its giving error. Assign Phone is also working fine.

can we see the updated worklow?

row.item(“Address”) so here Address is your column name right??
you can directly mention do it like this row(“Address”) = Company_Address

Tried… but not working.

@Anamika15 Check the Workflow by Inserting Wait For Ready Property as Complete in all UI Automation Activites used

Finally I used try and catch and its working ok now. Its skipping the assign whenever the exception occurs and continues with rest of the workflow.

1 Like

@Anamika15 The Exceptions Shouldn’t be occurring right? :sweat_smile:

tried this as well… still exception is coming.

Hi all,

I changed the selectors for Address and it took some time to get most stable selectors but finally I am not getting this exception anymore.

Thanks :slight_smile:

1 Like

I had same issues but got resolved by doing Variable.ToString

i did not get it .
How did you changed tht selector
This is my code and in blue i circled where the exception appear

Can you please tell me what i have to change?