- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 05:58 AM
In a business rule, I need to check if the users email does not contain a particular string like
gr.user.email !* NOTLIKE 'abc.com'
I have tried a few variations using the !* and NOTLIKE but there is still an issue with it.
Suggestions! TIA
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 06:09 AM
Hi Christina,
Please use
if (gr.user.email.indexOf('abc.com')==-1)
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 06:09 AM
Hi Christina,
Please use
if (gr.user.email.indexOf('abc.com')==-1)
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 06:36 AM
Perfect. Thank you!
What would be the inverse of that if I want check if it CONTAINS?
I tried gr.user.email.indexOf(abc.com')==1 and that didn't work.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 06:43 AM
to check contains use gr.user.email.indexOf(abc.com')>-1
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2017 06:11 AM
Hello,
Can you try to use 'DOES NOT CONTAIN' in the query?
something like, gr.addQuery('user.email','DOES NOT CONTAIN','abc.com');