Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SC 5 Inbox creation from Query (Expert Search) 1

Status
Not open for further replies.

LuapM

MIS
Aug 12, 2003
4
US
First, I want to thank those that helped me in the past. This place is a great resource.

I have a new issue. I have created an expert query that is 800 characters. This thing works perfect when I run an expert search. It brings back all the correct data and everything. Now, I want to be able to save it as an inbox for easier use. But, there is an 80 character limit in the inbox query field. I've checked all character limitations and they should accomodate this just fine.

Have any of you had similar issues and if so, what was the resolution? Thanks for any advice.

Luap
 
Could you please post the query? Then I will look whether I can help.

gr Willie
 
Sure, Here is the query:

flag=true and date(tod() - '7 00:00:00')<=open.time and ((severity.code=&quot;1&quot; and (tod() - '00:30:00')>update.time) or (severity.code=&quot;2&quot; and (tod() - '01:00:00')>update.time) or (severity.code=&quot;3&quot; and (tod() - '01:00:00')>update.time) or (severity.code=&quot;4&quot; and (tod() - '06:00:00')>update.time) or (severity.code=&quot;5&quot; and (tod() - '12:00:00')>update.time)) and flag=true and date(tod() - '7 00:00:00')<=open.time and ((severity.code=&quot;1&quot; and (tod() - '00:30:00')>open.time) or (severity.code=&quot;2&quot; and (tod() - '01:00:00')>open.time) or (severity.code=&quot;3&quot; and (tod() - '04:00:00')>open.time) or (severity.code=&quot;4&quot; and (tod() - '08:00:00')>open.time) or (severity.code=&quot;5&quot; and (tod() - '3 00:00:00')>open.time)) and problem.status<>&quot;Work around&quot;
 
Please think with me:

Your query was:

flag=true and
date(tod() - '7 00:00:00')<=open.time
and ( (severity.code=&quot;1&quot; and (tod() - '00:30:00')>update.time)
or (severity.code=&quot;2&quot; and (tod() - '01:00:00')>update.time)
or (severity.code=&quot;3&quot; and (tod() - '01:00:00')>update.time)
or (severity.code=&quot;4&quot; and (tod() - '06:00:00')>update.time)
or (severity.code=&quot;5&quot; and (tod() - '12:00:00')>update.time) )
and flag=true and
date(tod() - '7 00:00:00')<=open.time
and ( (severity.code=&quot;1&quot; and (tod() - '00:30:00')>open.time)
or (severity.code=&quot;2&quot; and (tod() - '01:00:00')>open.time)
or (severity.code=&quot;3&quot; and (tod() - '04:00:00')>open.time)
or (severity.code=&quot;4&quot; and (tod() - '08:00:00')>open.time)
or (severity.code=&quot;5&quot; and (tod() - '3 00:00:00')>open.time) )

and problem.status<>&quot;Work around&quot;

First you see that the flag =true and date(tod() - '7 00:00:00')<=open.time is twice there. I removed this one time.
Second: If you check on prio 1 for beeing opened longer then 30 minutes ago and on updated longer then 30 min ago you can see that the first is the stronger. To have been updated longer then 30 min ago it has to be open longer then 30 minutes. so you can skip this part in the second part. The same for prio2. This will also reduce the length.

Further on you have two things about prio 3-5. You can combine these in the query thus skipping the double use of severity.code=..

My doubt is in the meaning of the first <date(tod() - '7 00:00:00')<=open.time> Why do you not want to see the things that are older after all these statements?

The query that is over is state under: (I think SC can handle query longer then 80 char. If ound one out of the box of 319)


flag=true
and date(tod() - '7 00:00:00')<=open.time
and problem.status<>&quot;Work around&quot;
and(
(severity.code=&quot;1&quot; and (tod()-'00:30:00')>open.time)
or (severity.code=&quot;2&quot; and (tod()-'01:00:00')>open.time)
or (severity.code=&quot;3&quot; and ((tod()-'01:00:00')>update.time)
or( tod()-'04:00:00')>open.time))
or (severity.code=&quot;4&quot; and ((tod()-'06:00:00')>update.time)
or( tod()-'08:00:00')>open.time))
or (severity.code=&quot;5&quot; and ((tod()-'12:00:00')>update.time)
or( tod()-'3 00:00:00')>open.time))
)

You can remove the tabs and spaces, but I putted it this way for your convenience.

Gr Willie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top