Compile error " Row not declared

Hi All,

I have added for each row and in body under “Type Into” activity I have added below expression -
row.item(“MAD”).Tostring. its giving me above error.

In same body I have added another one “Type Into” -
row.item(“Sales Document Item”).Tostring, it is working fine but above one give me the compile error.

Can you attach your workflow, or send a screenshot?

Best,
Charbel

  1. Check if the row has been initialized before the usage
  2. Check the variable scoping of the row variable.

does this mean same sequence surrounds them?

Do check if there are duplicate variable if the row variable, this can be the reason for this

Hope this helps

1 Like

Hi

See if your FOR EACH ROW activity has variable named as CurrentRow or row

Mention the same based on the variable declared in FOR EACH ROW activity

If it’s not row and it is CurrentRow mention like this

CurrentRow(“MAD”).ToString

And for this

Is it another loop or the same one
Pls check that once

May be run in debug mode so that we can get to know where is exact error

But I think it’s with variable name in FOR EACH ROW Activity
So please check that
That’s the issue

Cheers @Asitabha_Deb_asitabhad

HI,

I need to automate two different activity from same excel. I have added sheet2 for second activity. In the both the sheet Column name is also same : Sales Documents and Sales Document Item. In Sheet2 (Name: ReceivingSO) there is a extra column “MAD”.

When I perform first activity from Sheet1 its working fine. I have declared variable for 1st activity in sheet1 under FOR EACH ROW is “unconfirm”.
row.item(“Sales Document Item”).Tostring

From Sheet2(ReceivingSO) I have also declared variable for 2nd activity from ReceivingSO under FOR EACH ROW is “swap”.

For both the activity have entered 2 different workflow under one Process.

But for second activity its giving me the error.
image