Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Using wildcards in DB Rules

SOLVED
Go to solution
Highlighted
Colleen Talbert
Collector

Using wildcards in DB Rules

I am trying to set up a Rule that will close any auto-generated Service Calls, unless the Information field contains any form of the word Fail - i.e. Failed, Failure, Failures, etc. It's always an upper case F, so case sensitive isn't the issue, but I'm trying to use the wildcard, so the condition statement looks like this:

When service call is created
where Template (*) equals Inbound email SVC4BACKUP
AND NOT (Information (*) contains Fail%)

I've checked the logs and it keeps saying "true" on the second condition no matter how I write it.

We're on Service Desk 4.5 SP25. Let me know if anyone has any ideas on how to make this happen.

Thanks,
Colleen

7 REPLIES
The Pike
Honored Contributor

Re: Using wildcards in DB Rules

Colleen,

I'm 'failing' (pun intended) to understand what the problem is. What is it that you want to make happen?
Colleen Talbert
Collector

Re: Using wildcards in DB Rules

Ha...nice pun. ;-) Here's the whole Rule:

When service call is created
where Template (*) equals Inbound email SVC4BACKUP
AND NOT (Information (*) contains Fail%)
Close when not failed/failure state (Update Data) Expected Completion set to (Current date); Solution set to Back up succeeded; Assignment;Assignment Status set to Closed; Assignment;To person set to Johanns, Tim; Actual Start set to (Current date); Status set to Closed; Actual Finish set to (Add to Current date 5 seconds); Closure code set to Solved

In other words, after a ticket is created, check or scan the Information field for the words "Failed" or "Failure" or any other form of the word "Fail", thus the need for the wildcard. If it doesn't contain any form of that word, then update the required fields to Close the ticket.

Make sense? Hope that clears things up and let me know if you have any suggestions.

Thanks,
Colleen
The Pike
Honored Contributor
Solution

Re: Using wildcards in DB Rules

Hi Colleen,

I still don't understand what the problem is. Maybe I'm still missing something *after reading several times*.

You don't really need a wildcard. SD will pick up 'fail, fails, failed, failure, failures, failing, etc' as long as you type in fail in the condition.

Now, if you want SD to pick up a specific string, then the text needs to be entered between double-quote marks.

What are you typing in the Information field to test the rule?

The Pike
The Pike
Honored Contributor

Re: Using wildcards in DB Rules

LOL. Only after reading my own post again I realized what the problem was.

Try typing fail% in the Information field and see what happens.

Points are welcome...
Gurevich
Member

Re: Using wildcards in DB Rules

NOT (Information (*) contains Fail%) will be TRUE for each SC? where Information doesn`t STARTs with "Fail".
Use " Fail%".
Colleen Talbert
Collector

Re: Using wildcards in DB Rules

Thanks for the help so far but the plot thickens... By just putting Fail in the rule, it was working great, but then the user came back with another criterion to add. So now I need the rule to fire when the information field has any form of the word "Fail" or contains the words "Mount Rack". Here's my rule:

When service call is created
where Template (*) equals Inbound email SVC4BACKUP
AND (NOT (Information (*) contains Fail)
OR NOT (Information (*) contains Mount Request)) ...

If you modify the criterion for Mount Request, you can see that I do have the quotes around the words but they're not showing up in the display. Now, it's closing all the tickets again, even the ones that say "Failures"...grrr.

Can you see what I'm doing wrong here?? Also, see the screen shot attached.

Thanks in again for the help with this!!
Gurevich
Member

Re: Using wildcards in DB Rules

NOT (Information (*) contains Fail%) will be TRUE for each SC? where Information doesn`t STARTs with "Fail".
Use " Fail%".

" Fail%"

"Fail%"

:)
//Add this to "OnDomLoad" event