Or condition not working

hi guys, i want to print some sheet in an excel file with some conditions, i already print all the sheets name and its working, but my or condition doesnt seem to work
my condition is :
(sheet.ToString = “Details”) or (sheet.ToString.StartsWith(“KSC”)) or (sheet.ToString.StartsWith(“KAV”))

it only prints the first condition and ignores the others
image

these message boxes dont show up :
image
image

is there something wrong with my condition ?

Hi @RobertoEwaldo,
Can you upload your workflow or the screenshot of the workflow?
I tried your condition and it works just fine.

1 Like

Hi @RobertoEwaldo,

Where you are using startswith method, use contains method and try.

The problem with startswith method is looks for exact KSC from start of the string and if there is a space it fails so use contains method.

And one thing in your conditions you are using sheet variable for all 3 conditions, what sheet variable contains

2 Likes

Main (8).xaml (13.4 KB)

1 Like

it’s the name of the excel sheets i’m trying to read,
it works with contains though, thanks

Can you close the topic if your issue is resolved