Focal Point
[SOLVED] Set specific sort order

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9747005086

January 28, 2016, 04:43 PM
MelissaReed
[SOLVED] Set specific sort order
I have a need in my report to sort by priority, which is stored as text. I would like to sort it as Critical, High, Medium, Low, not alphabetically. Is this possible in InfoAssist (or even App Studio if necessary)?

This message has been edited. Last edited by: Tamra,


WebFOCUS 8.0.09
Windows, All Outputs
January 28, 2016, 04:50 PM
Waz
Not sure about InfoAssist, but I would normally create a new field via a DECODE and set the values to the order needed, then sort by that field first (NOPRINTed).


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 29, 2016, 09:32 AM
BabakNYC
in InfoAssist, go to DATA tab and click DEFINE. Create a field called PR_SORT. On the right top corner of the Define Wizard, you see an icon fx which stands for the functions available in WF. Expand the Data Source and Decoding folder and look down next to last is a function called DECODE. Click that and then follow this syntax:

DECODE PRIORITY(Critical 1 High 2 Medium 3 ELSE 4)

Then sort by PR_SORT NOPRINT


WebFOCUS 8206, Unix, Windows