How to use switch activity

Dear all,

Good morning,

I have a input listing consist of information like delivery date, delivery type etc.

The data is in row by row, so i am using for each row activity to iterate the row information.

Each of the delivery type have different type of information needed to be include in the email.

i would like to use the switch activity to get the delivery type and use different email body to send email.

But when i use the switch activity, the first attempt will be always default case even though the delivery type is let’s say BONDED.

even i have create a case which is referring to BONDED.

Kindly advise me how to do this to get it execute the correct process which is tally with the delivery type.

Hereby i attached my input template and project file.

Thank you.Main.xaml (61.2 KB) DO monitoring sheet.xls (43 KB)

@irene0227 -

Look at the Write Line Output…I have remove send email inside switch and added Write Line …Now you see that , it is not going to Default case at all…

What I found is, your excel had additional space after word “Delivery”…when you click that cell you see the cursor position…Proof…


XAML: Main.xaml (41.0 KB)

Hope this helps…

@prasath17 Yes it works after i remove the spacing as you mentioned . Thanks a lot.

1 Like

@irene0227 - If in case, you do not want to remove the spaces manually you can use .trim , that will take care of this.

ok noted with many thanks.

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