- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:31 AM
Can someone please tell me why neither "Starts With" or "Contains" will send this workflow down the "Yes" path? Clearly when I log the variable the IP Address starts with 192.168. The IF activity is going down the "No" path every time.
I feel like I must be missing something simple and I am tired of looking at this...
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:35 AM
You can also do advance script like
if(current.variables.XXXXXXX.toString().indexOf("192.168") > -1 ){
answer = 'yes';
}else{
answer = 'no';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:35 AM
You can also do advance script like
if(current.variables.XXXXXXX.toString().indexOf("192.168") > -1 ){
answer = 'yes';
}else{
answer = 'no';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:38 AM
Ok that works...tested that earlier, but left the .toString() out of it.
Is there a similiar script for "startsWith" or in a run script is "IndexOf" your only option?
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:43 AM
try doing ( I have never used startsWith but give it a try)
if(current.variables.XXXXXXX.toString().startsWith("192.168") ){
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 08:39 AM
Thanks for this because this helped me with a script I was working on. 👍