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     how to grab all passed params and values in DM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
how to grab all passed params and values in DM
 Login/Join
 
Platinum Member
posted
Hi There

I need to wite a generic fex that will be included at the start of any report and grab the passed parameters. The report could be called by caster or by a post (not get) from a launchpage.

I know I can issue
-SET &ECHO=ALL;
-? &

to see the params... but I want to actually do something with the list, not just display it. Is there a way to cycle through the list of params in DM? Of course the params differ from report to report and the generic fex I need could not contain a list of expected params or anything like that. It must handle whatever is present.

I did see this posting.. from a few years ago

https://forums.informationbuilders.com/eve/forums/a/tpc/...681008331#4681008331

and that is exactly what I am trying to do also. I can do what the original poster did and create a huge param that contains all of the passed params but that would be a major hassle. I will look into that tomcat approach also.

Is there a way to do this now that did not exist in older versions of webfocus?


Thanks

Jodye

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


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Report This Post
Member
posted Hide Post
 
Posts: 16 | Location: New York | Registered: August 25, 2006Report This Post
Platinum Member
posted Hide Post
Hi Nathan

Yes, that is the post that I mentioned.

Thanks.


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Report This Post
Gold member
posted Hide Post
Here's an idea sent to me a while ago by Grzegorz. It builds a parameter list on the client side. You'll have to include code like this on every launch page, but you may find this preferable to the server side approach.
-James
< !-- A launch page: -->
<html> 
<head> 
<title>Launch Form</title> 
<script type="text/javascript"> 
function doSubmit(frm) 
{   
    if (!frm.PARAMNAMES) return true;

    var names = frm.PARAMNAMES;
    var optcnt = 0;
    for (var i=0; i < frm.elements.length; i++)
    {
         var element = frm.elements[i];
         if (element.name == "PARAMNAMES" || element.name == "IBIAPP_app" || element.name == "IBIF_ex"    || element.type == "submit") continue;
         var option = new Option(element.name);
         option.selected = true;
         names.options[optcnt] = option;
         optcnt++;
    }
}
</script> 
</head> 
<body> 
<form name="launchWF" action="/ibi_apps/WFServlet" method="post" onsubmit="doSubmit[this)"> 
<input type="hidden" name="IBIAPP_app" value="tests"/> 
<input type="hidden" name="IBIF_ex" value="catchparams"/> 
<input type="text" name="INPARAM" value="a value"/> 
<select name="MULTISEL" multiple size=2> 
<option value="MOPT1" selected>opt1</option> 
<option value="MOPT2" selected>opt2</option> 
<option value="MOPT3" selected>opt3</option> 
</select> 
<select name="SEL"> 
<option value="SOPT1">opt1</option> 
<option value="SOPT2">opt2</option> 
<option value="SOPT3">opt3</option> 
</select> 
<input type="submit" value="Run Report"/> 
<div style="display:none;"> 
<select name="PARAMNAMES" multiple> 
</select> 
</div> 
</form> 
</body> 
</html>

-* CATCHPARAMS: focexec, dealing with parameters. 
-* -IF &PARAMNAMES.EXISTS  EQ 0 THEN GOTO :NOPARAMS; 
-IF &PARAMNAMES0.EXISTS NE 0 THEN GOTO :STARTLOOP; -SET &PARAMNAMES0 = 1; 
-SET &PARAMNAMES1 = &PARAMNAMES; 
-:STARTLOOP -REPEAT :OUTERLOOP FOR &CNT FROM 1 TO &PARAMNAMES0; 
-TYPE -------------------------------------------- 
-SET &PARAMNAME = &PARAMNAMES.&CNT; 
-SET &LINE = '-TYPE ' | &PARAMNAME | ' = &' || &PARAMNAME ; 
&LINE.EVAL -SET &LINE = '-IF &' || &PARAMNAME || '0.EXISTS EQ 0 THEN GOTO :ENDPAR;';
&LINE.EVAL 
-SET &LINE = '-TYPE Number of multiple items: &' || &PARAMNAME || '0'; 
&LINE.EVAL 
-* Handling multiple parameter value 
-SET &MCNT = 0; 
-SET &LINE = '-SET &' || 'MSTOP = &' || &PARAMNAME || '0;'; 
&LINE.EVAL 
-:LOOPMULTI -SET &MCNT = &MCNT + 1; 
-IF &MCNT GT &MSTOP THEN GOTO :ENDMULTI; 
-SET &LINE = '-TYPE ' | &PARAMNAME | ' = &' || &PARAMNAME || &MCNT; 
&LINE.EVAL 
-GOTO :LOOPMULTI 
-:ENDMULTI 
-*----------------------------------- 
-:ENDPAR 
-:OUTERLOOP 
-:NOPARAMS

The idea is to add to HTML form one multiple select element, named PARAMNAMES and the doSubmit() function invoked on the onsubmit event. doSubmit function checks all the form elements, filter them and if the element is "recognized" as a parameter, its name is added to the PARAMNAMES list, so it will be passed as the CGI request (regardless if the method is POST or GET).
The FEX can handle the list of the parameter names, and then dynamically construct its own code (which makes the "real" work) using .EVAL.

Hope this helps
Grzegorz

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


WF 7.1.6 moving to WF 7.7, Solaris 10, HTML,PDF,XL
 
Posts: 83 | Location: Dartmouth Hitchcock Medical Center | Registered: April 17, 2003Report 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     how to grab all passed params and values in DM

Copyright © 1996-2020 Information Builders