Focal Point
[CASE OPENED] dynamic dropdown for multiple fexes

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

February 14, 2017, 01:17 PM
Nova27
[CASE OPENED] dynamic dropdown for multiple fexes
Hello,

I built a html launch page in HTML composer with start and end date fields and a dynamic dropdown of sales channels list. The values entered or selected in these 3 fields should be passed on to 1 of 3 reports (fexes) linked to this html page. I built 3 push buttons: 1 for each fex, so that user can enter dates and select a sales channel from the dropdown list and then push a button to run the report (fex).

My dynamic dropdown list query looks like this:
WITH
SELECTED AS
(SELECT '' AS P_SALESCHANNEL
FROM DUAL
)
,AEP_CHANNEL_LOOKUP AS
(SELECT '' AS P_SALESCHANNEL
FROM AEP.CHANNEL_LOOKUP
ORDER BY CHAN_FULL_NAME ASC
)
SELECT P_SALESCHANNEL AS "Sales Channel" FROM SELECTED
UNION ALL
SELECT P_SALESCHANNEL AS "Sales Channel" FROM AEP_CHANNEL_LOOKUP

This works fine to populate the dropdown list with all the expected values... But when I select a value from the list ex. COSTCO, the value that passes to the fex is something like this ''
I want only 'COSTCO' to be passed to the fex .. How do I do that?

Also, will having 1 (common) set of start & end dates work for all 3 fexes? will they each need separate date fields (text boxes)?

Thanks for all your help in advance!

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


WF 7.7.03, Win 7
February 15, 2017, 07:50 AM
MartinY
Hi Nova,
It's not clear when you say
quote:
the value that passes to the fex is something like this 'COSTCO'
I want only 'COSTCO' to be passed to the fex .. How do I do that?

since COSTCO is the same in your received and wish parameter...

About the date, you can have 1 set of parameter that will be used to all run button. You need to assign the parameter to all of them.

I think that you may need basic courses
You can also refer to
Creating and using parameters

Creating parameter values

Supply parameter values


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
February 15, 2017, 08:34 AM
Nova27
Hi,

I meant the value which passes from the dropdown to my parameter is
But I want only the word 'COSTCO' being passed...

Am I missing something?


WF 7.7.03, Win 7
February 15, 2017, 08:35 AM
Nova27
Okay .. something is wrong.. it's not typing what I am trying to ...
""


WF 7.7.03, Win 7
February 15, 2017, 08:52 AM
Tony A
Do you mean that you want it to be passed bounded by single quotes so that it is treated in your fex as a value and not a column?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 15, 2017, 09:06 AM
MartinY
In the HTML composer, in the control's properties there is an option : " Multiple : Add quotes ".
This is where you can chose to bind the selected value(s) with or without quotes.

Is that what you're looking for ?

When you're trying to show us specific example, put it between the (without the space after word "code")
 [code ] [/code ] 
tag. Last button from the message options. It will keep your typing as is.

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


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
February 20, 2017, 09:27 AM
Nova27
Ok.. I am trying this again...

When I select COSTCO from the dropdown list on my HTML launch page, it passes as
'<option value="COSTCO">COSTCO</option>'
in my sql pass thru fex...

I want only the value 'COSTCO' being passed to the fex inorder for my SQL to filter based on what's selected in the dropdown..

What am I doing wrong? Thanks!


WF 7.7.03, Win 7
February 20, 2017, 01:43 PM
MartinY
What are the Settings of the control ?

Difficult to believe that you receive the "whole" html line as the parameter value.

Have you tried to add this at the very top of you fex :
-? &
-EXIT

Following that, you can see that your fex variable does have that whole string:
'<option value="COSTCO">COSTCO</option>'

and not only COSTCO ?

If it's the case , you may need to contact support since they will be able to look at your code which we can't.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
February 21, 2017, 08:30 AM
Tamra
Nova,

What is the result if you add the 2 commands as Martin suggests.

At the beginning of the report focexec add in

-?&
-EXIT

Review the list of variables and see what you get for the one in question.

You can add a screenshot to your post for us to review - FAQs - scroll to find how to add an image.

If you are indeed seeing more that just the text COSTCO in your variable then please open a case and an IBI Technical rep will gladly assist you with this - Technical Support - select Case Management

Thank you for participating in the Focal Point Forum!
Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
February 21, 2017, 08:49 AM
Nova27
Hi Martin/Tamara,

The result for the variable is still that.. entire HTML code shows up in the variable instead of just the value 'COSTCO'...

I tried to post an image to the website you listed, but our company's network doesn't let me open that site.. neither can I open Dropbox.. so can't post an image right now...

Should I open a case then?

Thanks!


WF 7.7.03, Win 7
February 21, 2017, 10:41 AM
MartinY
Try with tinypic. com to post your image.

Also try to perform the following :
1- Create a backup of your HTML (save as will do the job)
2- Delete the control that have the issue from your HTML
3- Save your HTML
4- Re-open "cleared" HTML and create back your control, re-map it to your variable.
5- Test that new HTML. Does issue is still there ?

Otherwise yes, you should open a case since the error may be anywhere in your HTML.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
February 21, 2017, 11:30 AM
Nova27
Unfortunately, Yes... the issue still exists... I will open a case for this...

Thanks everyone for your help!


WF 7.7.03, Win 7
February 21, 2017, 01:47 PM
j.gross
For the record, here's the code Nova27 attempted to post:
WITH
 SELECTED AS
 (SELECT '<option value="*" SELECTED>All Channels</option>' AS P_SALESCHANNEL
  FROM DUAL
 )
,AEP_CHANNEL_LOOKUP AS
 (SELECT '<option value="'||TRIM[CHANNEL)||'">'||CHAN_FULL_NAME||'</option>' AS P_SALESCHANNEL
  FROM AEP.CHANNEL_LOOKUP
  ORDER BY CHAN_FULL_NAME ASC
 )
SELECT P_SALESCHANNEL AS "Sales Channel" FROM SELECTED
UNION ALL
SELECT P_SALESCHANNEL AS "Sales Channel" FROM AEP_CHANNEL_LOOKUP


Nova27 --
It might help us if you showed how you combined the result of that query with your static HTML.
Perhaps post a larger snatch of the launch page HTML from View Source -- escaped within code tags (use the < / > icon)