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 you send all the values in a drop down list?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How do you send all the values in a drop down list?
 Login/Join
 
Member
posted
When I add the "ALL" option to the list, it sends a _FOC_NULL. A _FOC_NULL basically removes the WHERE statement.
I can change the “ALL” option to send a FOC_NONE. I don’t really understand what that does, but it doesn’t give me all the list values.

I think I need a FOC_ALL. According to the documentation it sends “list values separated by the qualifier (AND or OR).” Perfect! This is what I want.

App Studio does not give me the FOC_ALL option. Any suggestions?

P.S.
I realize the users could just use their mouse to select, but they want an ”ALL”.

This message has been edited. Last edited by: Teri Newton,



 
Posts: 23 | Location: Cincinnati, OH | Registered: September 25, 2013Report This Post
Member
posted Hide Post
For ALL value is passed as _FOC_NULL or FOC_None is correct
These values basically tell WebFOCUS to ignore that filter


WF7702
 
Posts: 6 | Registered: December 03, 2013Report This Post
Virtuoso
posted Hide Post
Hi Teri and welcome to the Forum!
Are you using a static multi-select list?
If so, then:
"When you run a request with a static multi-select list, the Amper Autoprompt facilitydynamically adds the Select All option to the list of values"
according to the documentation.
AppStudio does not provide this option.

The difference between FOC_NONE and _FOC_NULL is in what internal processing does.
FOC_NONE will cause the whole line where FOC_NONE is found to be discarded.
_FOC_NULL will only cause the condition to be discarded.
Choose what is best for your users.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Thank you for the quck replies! However, I must not have explained the issue well.

I have a web page with a form that has a dynamic drop down list of locations. When various locations are selected their values are sent as...
LOCATION = 'DAL' OR 'DAY' OR 'DEN' OR 'ARB' OR 'UTC' OR 'GBG'


This string is then manipulated into column names for an FML report basically creating dynamic columns. I need the entire list of values, not _FOC_NULL.



 
Posts: 23 | Location: Cincinnati, OH | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Teri,

You say you display a drop-down list. I suppose it is a single list and if your user wants all the values you would not want her to select every one.
Could you use a double list and with one click transfer all the values? This would give the user ease of use and maybe change the order of the values if desired.

I'm not a great fan of AppStudio, so I am not sure it can do this.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Guru
posted Hide Post
One suggestion is Go for "Send Display Value" which will get you the column names comma separated instead of ' OR '. You just can replace the commas using STRREP. Still it will send only ALL if ALL is selected.

For your scenario if ALL is selected then do the same query you do to populate your dynamic dropdown, Hold it, Read it to form a string of column names.


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
Master
posted Hide Post
Teri, a dropdown list, also known as a combobox in .NET world, by all means send one or more selected values, but not really meant to send all of them. If you need all information, then you send, in this case _FOC_NULL and on the receiving end, your fex report knows that _FOC_NULL means ALL of them and ignores the filter automatically, you don't have to do anything but pass _FOC_NULL.

With that said, it's not that it's impossible to send all of them, just not the right way to do it. You can use JavaScript, to select all items in the dropdown before submitting.

var myObj = document.getElementById("MyObjectID");
var mySubmit = document.getElementById("MySubmitButtonID");
setSelectedValue(myObj, true);
mySubmit.click();

function setSelection(objID, selectIt) {
	for (var i = 0; i < selectObj.options.length; i++) {
		selectObj.options[i].selected = selectIt;
	}
}



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
Gavin,

Very nice but it makes me wonder.
When FOCUS came out way back in 1975 its appeal was that it was the first 4GL (4th Generation Language) where you declared what you wanted to do and not how the machine should do it.
I find that relying on Javascript is a bit of a regression.
I understand fully Teri's desire to be able to give the user this possibility and the option should be provided.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Master
posted Hide Post
quote:
I find that relying on Javascript is a bit of a regression.


Well, as my signature says.. I'm one of those Focus Manipulators. I get tired of fighting with WebFOCUS to do what it has never done, but I have the requirements to do. With such an extensive development background in many languages, I find focus to be a regression. It has it's good qualities, things that others can't do, which is why I don't fight it too much, but with technology at the point that it is today, JavaScript is the only work around when WebFOCUS can't deliver.

Now, I'm not saying what Teri is trying to do is right. I don't really know as I'm not on that end to see what they are doing. Giving them options only allows them to try them all to see which works best.

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Member
posted Hide Post
All your help has been greatly appreciated! I went with part of Ramkumar's solution.

If the user selects the ALL option, a _FOC_NULL is sent. So redo the query to get all locations and manipulate it into a string of code.
-IF &LOCATION NE '_FOC_NULL' THEN GOTO SKIP_THIS ;
TABLE FILE LOCATIONS
BY MCRP16_CODE AS 'LOC'
WHERE GBFY EQ '&FY';
WHERE MCRP01_CODE EQ '&COMPANY';
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS LOC_VARS FORMAT ALPHA
END
-RUN

-* store locations in an array
-*--------------------------------------------------------------------------------
-SET &I = 1;
-REPEAT READ_LOC &LINES TIMES
-READ LOC_VARS &LOC.&I.A3
-SET &I = &I + 1;
-READ_LOC;
-*--------------------------------------------------------------------------------

-* read array into a string
-*--------------------------------------------------------------------------------
-SET &N = &LINES - 1;
-SET &N = 1;
-SET &LOCATIONS = '''' | &LOC.&I;
-SET &I = 2;
-REPEAT SET_LOC &N TIMES
-SET &LOCATIONS = &LOCATIONS | ''', ''' | &LOC.&I;
-SET &I = &I + 1;
-SET_LOC;
-*--------------------------------------------------------------------------------

-TYPE LOCATIONS = &LOCATIONS

LOCATIONS = 'AND', 'ARB', 'ATC', 'BAA', 'BAY', 'CHI', 'CIN', 'CLE', 'CLV', 'CRC', 'DAL', 'DAY', 'DEN', 'FLA', 'GBG', 'GMI', 'GRN', 'HST', 'INA', 'IND', 'LAL', 'NAT', 'PHO', 'PHX', 'PIT', 'RAL', 'STL', 'UTC', 'WCT', 'WPB' 



 
Posts: 23 | Location: Cincinnati, OH | Registered: September 25, 2013Report 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 you send all the values in a drop down list?

Copyright © 1996-2020 Information Builders