How to use multiple if condition in switch?


What I have done :
In switch condition :
If(in_academie_name.Contains(“queueA”),“queueA”, If(in_academie_name.Contains(“queueb”),“queueb”, “Default”))

It’s work great !!!

What I want :
Add multiple if condition in switch for queueC, queueD…etc
How can I implement that ?

Advance Thanks,

1 Like

Hey @MasterSinge

What I see here as a best solution is like you can try using a String Split or Substring methods to accomplish the same if your raw string text follows a pattern.



Hope the following sample helps you.


Then, condition of switch is

System.Text.RegularExpressions.Regex.Match(in_academie_name,String.Join("|",keywords.Select(Function(s) System.Text.RegularExpressions.Regex.Escape(s)))).Value


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