Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] AHTML sort
 Login/Join
 
Platinum Member
posted
Hi

I have a AHTML report and fields are displayed dynamically from double listbox on html page. Users have option to select their own fields and re-arrange in the order they want.

Is there a way to sort all the fields in the output? If the user selects 5 fields, they should be sorted by 1st field,then 2nd, then 3rd, 4th and 5th.

Tried few ways but did not work.
Appreciate your response.
thank you

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Silver Member
posted Hide Post
Hi,

I guess you collect the listbox value in a variable and pass to the fex that generates AHTML. If you can assign the listbox values to parameters like &PARAM1 , &PARAM2 ... etc. Then use the below line to default sort them based on user field selection.

BY &PARAM1 &PARAM2 &PARAM3 NOPRINT



Release : 7.7.02
OS : Linux
App Server : Tomcat
all output
 
Posts: 36 | Registered: February 03, 2011Report This Post
Platinum Member
posted Hide Post
I tried it. But I need to use NOPRINT as well and I am having problem there.

Fields come with AND between them and I am replacing them with BY. now I need to put NOPRINT as well and its not working fine.


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Guru
posted Hide Post
 
-SET &INFL = '''FIELD1'' OR ''DLEIF2''';
-SET &OUTFL = STRREP (&INFL.LENGTH, &INFL, 10, ' OR ', 1, ',', &INFL.LENGTH, 'A&INFL.LENGTH');
-SET &STRING = &OUTFL;
-SET &SEARCHCHAR = ',';
-SET &STRING_LEN = &STRING.LENGTH;
-SET &CHARCOUNT = 0;
-SET &IDX = 1;

-REPEAT :EL1 WHILE &IDX LE &STRING_LEN;
-SET &CHARACTER = SUBSTR(&STRING_LEN, &STRING, &IDX,
-                 &IDX, 1, 'A1');
-SET &CHARCOUNT = IF &CHARACTER EQ &SEARCHCHAR THEN &CHARCOUNT + 1
-                 ELSE &CHARCOUNT;
-SET &IDX = &IDX + 1;
-:EL1

-SET &NUMELEMS = &CHARCOUNT+1;

-REPEAT EL2 FOR &CNTR FROM 1 TO &NUMELEMS
-SET &FIELDVAL&CNTR.EVAL = GETTOK(&OUTFL, &OUTFL.LENGTH, &CNTR, ',', 10, ' ');
-RUN
-EL2

-TYPE &FIELDVAL1
-TYPE &FIELDVAL2




With this above code, you can seperate the Values coming from the List box into seperate elements...

After that, have the count of the & FIELD VALUES set in a variable...


After TABLE FILE Request, Put a LOOP with that COUNTER and DO a BY inside based on &FIELDVAL&CNTR.EVAL .

 
TABLE FILE SOANDSO
-REPEAT EL33 FOR &CNTR FROM 1 TO &CNTR
BY &FIELDVAL&CNTR.EVAL NOPRINT
-EL33
-RUN
END


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Guru
posted Hide Post
This logic is dyanamic, and so this can be applied for any number of Field Name, and BY Fields.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders