Sorting QBEs (probsummary) (522 Views)
Reply
Honored Contributor
VVV_3
Posts: 582
Registered: ‎08-01-2008
Message 1 of 8 (522 Views)

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?

 

Honored Contributor
VVV_3
Posts: 582
Registered: ‎08-01-2008
Message 2 of 8 (508 Views)

Re: Sorting QBEs (probsummary)

Look here:

http://h30499.www3.hp.com/t5/ITRC-OV-ServiceCenter-Service/Newest-incident-first-and-in-focus-after-...

 

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)})

Member
Martin_E
Posts: 2
Registered: ‎10-31-2011
Message 3 of 8 (501 Views)

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
VVV_3
Posts: 582
Registered: ‎08-01-2008
Message 4 of 8 (488 Views)

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
VVV_3
Posts: 582
Registered: ‎08-01-2008
Message 5 of 8 (487 Views)

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
VVV_3
Posts: 582
Registered: ‎08-01-2008
Message 6 of 8 (481 Views)

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
VVV_3
Posts: 582
Registered: ‎08-01-2008
Message 7 of 8 (462 Views)

Re: Sorting QBEs (probsummary)

so, problem is still open - how to sort QBEs?
for e.g. Incidents?
Frequent Advisor
bzember
Posts: 42
Registered: ‎10-09-2011
Message 8 of 8 (222 Views)

Re: Sorting QBEs (probsummary)

did you solve it?

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.