Trying to get the bot to write to a new column based on an if

Scenario - the data I have has NULLS, so I need the bot to go row by row in a column and look for the NULLS. I am using an if with a condition of String.IsNullOrEmpty(row(“PreAdminPainScore”).ToString) I read the range > then a for each > I added a Lookup Data Table > then the “if” after that I assign it then write it back into sheet 2. I am missing something.

but when I run it and assign it is gets stuck in a loop. I’m no expert in this stuff.

Hi @jeff.shubzda,

Can you share screenshot of your workflow?

Also, have you tried running in debug mode? What activity and what value of that activity control gets stuck in?

Regards
Sonali

Yeah it just loops, I have this done wrong in the area of assign I’m guessing (one) is the first part of adding in the column header and two is the for each with a look up data table in there


(3) is the if condition and (4) is the assign I think I did wrong row.Item(“Compliance”) and value of “NonCompliant” then I write to the table below that. I know I did this wrong. :frowning:

Hi @jeff.shubzda,

Please use row(“Compliance”)=“NonCompliant” directly, no need to include .Item in there.

It should work.

Regards
Sonali

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.