Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Sorting QBEs (probsummary)

Highlighted
Honored Contributor [Founder]

Sorting QBEs (probsummary)

Hello,

 

we need to have Incident QBE sorted by <number> descending (the last Incidents were at the top of qbe).

For that purpose we've donethe following:

- in Display Screen record <apm.edit.problem> added line to the end of Initialization section:

$L.void=setsort($L.file, {"number"}, 1)

 

so, when we search Incidents, the sorting is fulfilled, but the active record in the qbe is in the bottom, so the 1-st Incident registered.

How to make active the last registered Incident?

 

7 REPLIES
Honored Contributor [Founder]

Re: Sorting QBEs (probsummary)

Look here:

http://h30499.www3.hp.com/t5/ITRC-OV-ServiceCenter-Service/Newest-incident-first-and-in-focus-after-search/m-p/4799040/highlight/true#M54958

 

it's strange, but adding this line to im.view.init process solves the problem:

 

if null($found) then ($L.sort={"number"};$L.void=setsort($L.file, $L.sort, 1);$L.rc=rtecall("rgoto", $L.rc1, $L.file, 0);$found=true);$L.title=scmsg(52, "pm", {str(number in $L.file)})

Senior Member

Re: Sorting QBEs (probsummary)

Hello,

another way could be to define a favorite (inbox) - here you can define the sort field as well as the sort order (ascending or descending).

The advantage is, that SM issues a proper query against the database (including the sort in the query).

The setsort command will sort the results AFTER the db select, which could take longer if you have quite a list of data.

BR

 

Honored Contributor [Founder]

Re: Sorting QBEs (probsummary)

Hello, Martin, thanks for your reply.

we have done sorting in Views (inboxes), but when users search Incidents from menu navigator, QBE is displaying.

Therefore customer has requirement QBEs look like inboxes with the same sorting as well.

 

 

Honored Contributor [Founder]

Re: Sorting QBEs (probsummary)

so, for <probsummary> QBE solution exists, but does anybody know about any universal solution which could be applied to any SM table,qbe?

Honored Contributor [Founder]

Re: Sorting QBEs (probsummary)

We checked today Incidents. The sorting is working and we see newest Incident active in QBE, but now we have troubles with saving Incidents - SM hangs on when saving.

we delete this line we added before from <im.view.init>:
if null($found) then ($L.sort={"number"};$L.void=setsort($L.file, $L.sort, 1);$L.rc=rtecall("rgoto", $L.rc1, $L.file, 0);$found=true);$L.title=scmsg(52, "pm", {str(number in $L.file)})

and now saving is working....

so, problem is still open - how to sort QBEs?
Honored Contributor [Founder]

Re: Sorting QBEs (probsummary)

so, problem is still open - how to sort QBEs?
for e.g. Incidents?
Frequent Advisor

Re: Sorting QBEs (probsummary)

did you solve it?