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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]HOW DO I SUM/LIST 2 COLLUMNS FOR DROP DOWN BOX??

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]HOW DO I SUM/LIST 2 COLLUMNS FOR DROP DOWN BOX??
 Login/Join
 
Member
posted
I NEED TO HAVE BOTH COLLUMNS LISTED IN THE DROP DOWN BOX AND MY CODING IS NOT WORKING FOR ME.

THIS IS WHAT I HAD BEFORE THAT WORKED FOR LISTING THE COUNTY NAMES

TABLE FILE TABLENAME
SUM
NA_COUNTY
NA_COUNTY
BY NA_COUNTY NOPRINT
WHERE NA_COUNTY NOT LIKE '%,';
ON TABLE PCHOLD FORMAT XML
END

AND NOW I NEED TO ADD IN THE COLLUMN NA_ATRNY_TER WHICH IS A LIST OF 2 NAMES THAT MATCH UP TO EACH COUNTY AND ?. I NEED ONLY ONE OF EACH NAME TO BE PRINTED IN THE LIST. IN THE COLLUMN NA_COUNTY THE COUNTY NAMES ARE ALSO LISTED AS MULTIPLES.

ANY SUGGESTIONS WOULD BE GREATLY APPRECIATED!

This message has been edited. Last edited by: Julie H.,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: May 24, 2011Report This Post
Guru
posted Hide Post
Julie,

You can combine fields in a DEFINed field like this.
quote:
DEFINE FILE CAR
DD_VAL/A50=COUNTRY || '-' || CAR ;
END

TABLE FILE CAR
SUM MAX.MODEL
BY DD_VAL
ON TABLE PCHOLD FORMAT XML
END


This code populates the drop down with the combined Country and Car returns the MAX Model for the group. Is that what you're talking about?
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Member
posted Hide Post
No I do not believe so. I am trying to create a drop down box that lists all the counties from the NA_COUNTY collumn one time each, plus lists the two names from the NA_ATRNY_TER collumn one time each.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: May 24, 2011Report This Post
Guru
posted Hide Post
Can you type out an example of what the drop down would look like?
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Member
posted Hide Post
ADAIR THROUGH WRIGHT COUNTIES WILL BE LISTED AND THEN THE TWO NAMES MIKE AND PAUL.

ADAIR
AUDRAIN
ETC
ETC
WRIGHT
MIKE
PAUL

I WAS ABLE TO MAKE THE LIST SHOW UP HOW I WANTED IT TO LOOK BY USING THE FOLLOWING CODING, HOWEVER IT IS NOT RETURNING RESULTS WHEN CHOOSING THE TWO NAMES. DOES THIS CODING LOOK CORRECT (MEANING THERE IS SOMETHING WRONG ELSEWHERE) OR DO I NEED TO TRY SOMETHING DIFFERENT?

TABLE FILE TABLENAME
SUM
NA_COUNTY
NA_COUNTY
BY NA_COUNTY NOPRINT
WHERE NA_COUNTY NOT LIKE '%,';
ON TABLE PCHOLD FORMAT XML
END

TABLE FILE TABLENAME
SUM
NA_ATRNY_TER
NA_ATRNY_TER
BY NA_ATRNY_TER NOPRINT
WHERE NA_ATRNY_TER NOT EQ '?';
ON TABLE PCHOLD FORMAT XML
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: May 24, 2011Report This Post
Guru
posted Hide Post
So you want to combine two fields (columns) into a one column list. The drop down would look exactly like this

ADAIR
AUDRAIN
ETC
ETC
WRIGHT
MIKE
PAUL

With "ADAIR, AUDRAIN, ETC, ETC, WRIGHT" coming from the NA_COUNTY Column and "MIKE, PAUL" coming from the NA_ATRNY column.

When the user makes the selection, you want to return the value that was selected? In other words, they Select "MIKE" then the value returned is "MIKE"

Is that right?
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Guru
posted Hide Post
This needs a little more work to fix the order, I would build an idex column to keep the Countries together but this should give you an idea on at least one method of putting this together. Hope this helps and have a great weekend.
quote:
SET ASNAMES ON
SET HOLDLIST = PRINTONLY

TABLE FILE CAR
PRINT
COUNTRY/A20 AS 'DISPVAL'
COUNTRY/A20 AS 'RETURNVAL'
BY COUNTRY NOPRINT
ON TABLE HOLD AS DDLIST1 FORMAT FOCUS
END
-RUN

TABLE FILE CAR
PRINT
CAR/A20 AS 'DISPVAL'
CAR/A20 AS 'RETURNVAL'
BY CAR NOPRINT
ON TABLE HOLD AS DDLIST2 FORMAT FOCUS
END
-RUN

TABLE FILE DDLIST1
BY DISPVAL
BY RETURNVAL
ON TABLE HOLD AS DDLIST3
MORE
FILE
DDLIST2
END
-RUN

TABLE FILE DDLIST3
BY DISPVAL BY RETURNVAL
ON TABLE PCHOLD FORMAT XML
END

 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Member
posted Hide Post
Thank you for all your help.

I got it to work by putting this statement in

-IF &NA_COUNTY EQ 'MIKE' OR &NA_COUNTY EQ 'PAUL' THEN GOTO SKPCOUNTY;
WHERE NA_COUNTY EQ '&NA_COUNTY';
-SKPCOUNTY

-IF &NA_COUNTY NE 'MIKE' AND &NA_COUNTY NE 'PAUL' THEN GOTO SKPATNY;
WHERE NA_ATRNY_TER EQ '&NA_COUNTY';
-SKPATNY


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: May 24, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]HOW DO I SUM/LIST 2 COLLUMNS FOR DROP DOWN BOX??

Copyright © 1996-2020 Information Builders