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.
When I remove and re-add the columns as Detail columns (no sorting) the record is displayed. I've also found if I change the data in the TASK_NAME column to include a unique value at the beginning of the field, the 200TIP5-1-39 record is displayed as (Display repeated sort values is off):
TABLE FILE REPORT_TASK_FULL BY TASK_ID BY TASK_NAME HEADING ""
This works, interesting, I do believe though as you have no print or sum statement all you are going to get is the unique instances of the by fields. If that is what you want have you tried adding say
PRINT TASKNAME NOPRINT
OR
PRINT TASKNAME BY TASK_ID
or did something just get missed in your copy paste?
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Tom, surprisingly the TASK_ID is equal to 200TIP5-1-39, but WebFocus is chopping off the "9" at the end. I've traced the SQL and verified that Oracle is returning the correct data. In the first example (without the "A-" and "B-"), it appears to be chopping off the "9" at the end of TASK_NAME as well and considering it a duplicate row.
Leah, adding
PRINT TASK_NAME NOPRINT
fixed the problem.
So the conclusion: to sort by all fields you must add a hidden, unsorted field.
Thanks for your help and quick replies. BrianThis message has been edited. Last edited by: BrianLow,
WebFOCUS 7.6.1 Client: Windows XP, Server: Solaris 10 Output: Excel, HTML and PDF
You may want to check your master file description to make sure the USAGE format for your field is long enough to accomodate the longest length of the field values for TASK_NAME. This may be your problem.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Good advice Mickey. In this case the fields are long enough. The "truncating" is not consistent because it will appear to truncate "200TIP5-1-39" but not "200TIP5-1-38".
WebFOCUS 7.6.1 Client: Windows XP, Server: Solaris 10 Output: Excel, HTML and PDF
Brian, starting with what we know as given: focus doesn't truncate, just on a whim. To truncate a field, you actually have to work at it deliberately, maybe set up an edit function, or some other activity, or as mickey suggests, perhaps apply a different master file. and just to be clear, DETAIL and SORTing aren't related. It sounds as tho you're using the GUI, since you're using the word 'DETAIL' in your post. The word 'DETAIL' isn't in code anywhere, its just something a gui user clicks on to effect the change of the verb from SUM to PRINT. The word 'DETAIL' means don't aggregate, there are only 2 choices...either aggregate or don't. In your fex, the first posting, you're using SUM. You don't actually see that you're using SUM, but you are. The word BY with no verb creates a SUM by default, and produces a sorted, aggregated list. The word BY with the verb PRINT creates a sorted , granular (or 'detail') list.
If you repeat Tom's example, above, and stick in a SET BYDISPLAY = ON (I don't know how you flip that switch in the gui, but you'll figure that out), you'll see what the underlying data in the output actually looks like, and the light bulb will go on.
if you want an aggregate list of unique pairs, TABLE FILE.. BY FIELD1 BY FIELD2 END will absolutely give it to you. if you want a granular list of your entire data set, TABLE FILE ... PRINT FIELD2 NOPRINT BY FIELD1 BY FIELD2 (..or any of a number of variations on that theme) will absolutely give it to you.
As for the truncation, as mickey says, you've got something else going on...some errant field redefine perhaps, because focus doesn't perform edits without specific effort. Keep researching... -s. ps.. It looks like you're new to the Point. welcome, and you might really enjoy taking the intro to focus class or two, which will get you quite comfortable with the gui use and with data exploration using it. We all highly recommend that to everyone. It'll make you smile.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Another thought is maybe the actual values in the database randomly have a leading blank space? This would not be so obvious if the report results appear in HTML. You could also, just as an experiment, make the length of the TASK_ID field in the MFD even longer than you think it needs to be to see if the values then appear OK. If they do, leading blank spaces might be in some of the values.
I'm just trying to think of some reasons why this is happening. As Susannah said, I have never seen WF truncate for no reason either. There must be something causing this.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
A solution was found (I've highlighted in bold above for anyone reading this later to find easily). However, perhaps it is a workaround rather than a solution.
I'll post a full sample that replicates the problem. Here is a SQL script to create the table and necessary data:
drop table test_table;
create table test_table (
task_id varchar(50) not null primary key,
task_name varchar(200)
);
Insert into test_table (task_id, task_name) Values ('200TIP5-1-2', 'A-NameForTask200TIP5-1-2');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-3', 'B-NameForTask200TIP5-1-3');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-20', 'C-NameForTask200TIP5-1-20');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-21', 'D-NameForTask200TIP5-1-21');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-22', 'E-NameForTask200TIP5-1-22');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-23', 'F-NameForTask200TIP5-1-23');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-24', 'G-NameForTask200TIP5-1-24');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-25', 'H-NameForTask200TIP5-1-25');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-26', 'I-NameForTask200TIP5-1-26');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-27', 'J-NameForTask200TIP5-1-27');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-28', 'K-NameForTask200TIP5-1-28');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-29', 'L-NameForTask200TIP5-1-29');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-30', 'M-NameForTask200TIP5-1-30');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-31', 'N-NameForTask200TIP5-1-31');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-32', 'O-NameForTask200TIP5-1-32');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-33', 'P-NameForTask200TIP5-1-33');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-34', 'Q-NameForTask200TIP5-1-34');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-35', 'R-NameForTask200TIP5-1-35');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-36', 'S-NameForTask200TIP5-1-36');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-37', 'T-NameForTask200TIP5-1-37');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-38', 'U-NameForTask200TIP5-1-38');
Insert into test_table (task_id, task_name) Values ('200TIP5-1-39', 'V-NameForTask200TIP5-1-39');
commit;
I created a new procedure with this code (not using the GUI):
SET BYDISPLAY = ON
TABLE FILE test_table
BY TASK_ID
BY TASK_NAME
END
My observations: 1. The last row should read "200TIP5-1-39 V-Name...." 2. The "200TIP5-1-3" should be sorted before the 200TIP5-1-30 record (notice the -2 record is sorted before -20). 3. Deleting the 200TIP5-1-2* records eliminates this problem though they should have no impact. 4. Adding a PRINT TASK_NAME NOPRINT eliminates this problem. 5. Doubling the field sizes in the synonym does not help 6. There are no leading or trailing whitespace
I've got a solution (thanks again), but it would be interesting to understand this behaviour.
BrianThis message has been edited. Last edited by: BrianLow,
WebFOCUS 7.6.1 Client: Windows XP, Server: Solaris 10 Output: Excel, HTML and PDF
If you have not already done so, open a tech support case with IBI. This is strange behaviour which needs to be addressed by IBI. You should not have to work that hard to do a simple request.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003