wzlim1024
(wzlim1024@gmail.com)
March 5, 2020, 8:35am
1
Lets say I take the url of a website and call it variable “URL”
URL can be any thing like:
www.goog.com/CRM/123123sdadawa123
www.goog.com/HOME/12312wqeq13rtw4
I want to use a switch condition
case when URL = “www.goog.com/CRM/ " then do action 1
case when URL = "www.goog.com/HOME/ ” then do action 2
how should i type the condition expression , in my case case when URL = “www.goog.com/CRM/* ” . Considering I have a wild card * which i am not bothered with what comes after that.
is this possible?
Sugumar8785
(Sugumar Ramachandran)
March 5, 2020, 8:42am
2
@wzlim1024 You can use any of the string functions like URL.Startswith(" www.goog.com/CRM/ “) or URL.Contains(” www.goog.com/CRM/ " instead of using wildcard character.
In this case, you will have to go with If Else.
4 Likes
wzlim1024
(wzlim1024@gmail.com)
March 5, 2020, 9:33am
3
Thanks Sugumar8785!
Can we use switch activities? Its neater if I got 2 conditions or more?
Or if I have more than 2 conditions what should I use ?
case when URL = “http://www.goog.com/CRM/ * " then do action 1
case when URL = “http://www.goog.com/HOME/ * " then do action 2
case when URL = “http://www.goog.com/HR/ * " then do action 3
Sugumar8785
(Sugumar Ramachandran)
March 5, 2020, 9:38am
4
@wzlim1024 In that case,
Using IF activity check the URLS , Based on what URL it holds , create 3 variable and assign some unique values for each.
Use them in Switch case.
system
(system)
Closed
March 8, 2020, 9:38am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.