If Condition not working when I compare 3 row from Extract Structured DT

Hi All,
I need help with comparing 3 values I am getting from Extract Structured DT

  1. I go to company website
  2. Get data into Extract Structured DT activity.
  3. Compare each row
  4. If Condition to filter the value I need, else quit saying no matching employee found.
    (application_status=“Application Complete” and process="" and department_Code=“C100”)

Even when there is 1 matching results, if condition still goes to else part and quits saying no matching result found. I have tried using flow decision as well. But no luck.

@Rubot Check with this condition application_status=“Application Complete” and process=" " and department_Code=“C100”

@indra thanks for your prompt repy dude.I tried with space between " " for process. But Still no luck. I even changed the condition to department_Code=“G104”. Even that didnt work. Before comparing, when extracting the rows using get row activity, I am printing these values and they all are fine.

I think Column name is Status,Process,Department instead of application_status and department_code as i saw your screenshot

1 Like

@sandeep13 as you mentioned yes column names are Status, Process and Department Code. I am getting these values in Get Row Item activity, which allows to capture value by Column, ColumnIndex and ColumnName. ColumnName is where I have given actual Names and get their values in Output > Value


  1. if Output>Vaue is generic type then you should convert to String before check apply filter
    2)Make Sure You Trim Method to avoid Extra space
1 Like

Are you sure that the values extracted from the tables are without space ? Try displaying it, and add some characters before and after the item (for example : --item–) so you make sure that there are no spaces in your extracted items , and use Equals , instead of = operator

Hi Sandeep, I have taken care of both the things. Output>Value variable type is String. And I am using Trim Method to avoid any extra space if there is any.

Hi @Nawfal_Hamdi, Thanks for your reply.
I am taking care of extra space and operators. I have tried almost everything. Below are 3 different conditions I have checked, but no luck yet.

Condition 1
application_status.ToString.Trim=“Application Complete” and process.ToString.Trim=" " and department_Code.ToString.Trim=“C100”

Condition 2
application_status.ToString.Trim.Contains(“Application Complete”) and process.ToString.Trim.Contains("") and department_Code.ToString.Trim.Contains(“C100”)

Condition 3
application_status.ToString.Trim.Contains(“Application Complete”) and String.IsNullOrWhiteSpace(process) and department_Code.ToString.Trim.Contains(“C100”)

Hi @Rubot , have you tried to display the items before you check the condition with the if ?

Hi @Nawfal_Hamdi, yes I am printing these items to check if they are correct. They get printed 3 times or each row is printed, which happens 3 times.

All, found the issue I was having with If Condition not picking up the correct data. If condition I had was out of the For Each Row and therefore was comparison variables always held last value in the memory to verify against when script entered If activity. By moving If condition inside the For Each Row activity gave access to all the values returned by For Each Row activity and therefore If condition worked.