I have the string value 'National Unified Number' in cell A3. I want to set a condition that stops execution if cell A3 contains a string; otherwise, it should continue

I have the string value ‘National Unified Number’ in cell A3. I want to set a condition that stops execution if cell A3 contains a string; otherwise, it should continue.

@Mohammad_Rizwan_03

Use Read cell value activity

 If (String.IsNullOrEmpty(cellValue.ToString.Trim) = False)
        Break
else
your flow

@Mohammad_Rizwan_03,

I’m assuming you are using For Each Row in Excel activity. Inside it use If condition to check the cell value and in true sequence, use Break activity.

This will break the loop and you can have further logic after the for each.

Thanks,
Ashok :slight_smile:

I’m using a ‘For Each Row’ activity, but the ‘If’ condition always evaluates as true, even when it shouldn’t.

Hi @Mohammad_Rizwan_03

By using For Each Row in Data Table activity

CurrentRow("Name").ToString.Trim.Equals("National Unified Number")

Input:

image

Output:

By Using Read Cell activity

Output:

Sequence16.xaml (17.5 KB)

Regards,

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