Focal Point
Passing variables to a fex in self serve.

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

September 12, 2006, 05:14 PM
newtofocus
Passing variables to a fex in self serve.
Hi,

I have a fex that is being called from a self serve. I have a fex that accepts a variable. How do I pass the variable through self serve.

Thanks.


WF7.1.4 Prod/Test, MRE, self serve, DM
September 12, 2006, 05:26 PM
Nightowl
We pass our variables in the URL as follows:
http://localhost:8000/ibi_apps/WFServlet?IBIF_ex=fextorun.fex&DEPT=Sales

You can see the department variable (&DEPT) is passed the value Sales


Using: WF 7.1.5, XP Pro, Tomcat, Self Serve
September 12, 2006, 05:40 PM
newtofocus
Thanks Night Owl, I want a way to pass it through a HTML page.


WF7.1.4 Prod/Test, MRE, self serve, DM
September 12, 2006, 06:26 PM
Nightowl
Are you talking drilldown?


Using: WF 7.1.5, XP Pro, Tomcat, Self Serve
September 13, 2006, 06:46 AM
Tony A
ntf,

A variable can be passed from an HTML page by using one of many FORM tags. These can be INPUT, SELECT, BUTTON etc. These tags are assigned an attribute called "name" and this attributes value is the resultant WebFOCUS variable name.

So, for instance, you might want to pass a variable called "MyVar" from your HTML page as a fixed value of 999. To achieve this you would probably use an INPUT TAG and the basic requirements would be -
<INPUT name=MyVar type=hidden value=999>


When your HTML page is actioned a variable in the URL (if the form method is GET) will be seen as
&MyVar=999
.

Of course this info is very brief and should you want to find out more then I would suggest checking out one of the many HTML tutorial sites that keep emerging, specifically in the region of FORM submission.

Good luck.

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 
September 13, 2006, 09:31 AM
<dskelly>
Newtofocus,
When you use an HTML form the variable values from the HTML objects are automatically sent to the fex as &variables. For example, a value from a drop down box selected by the user becomes a variable in your fex with the same name as the HTML object. You can send non-user selected variables using the input type in HTML. You can also build urls like Nightowl does, and the variable values can be changed at run time by using javascript (or other scripting language).
September 13, 2006, 10:22 AM
susannah
NewTo...
do you have MRE?
the simplest way to begin creating an html launch page might be for you to do use the PUBLISH button in MRE. it takes all your parameters requried by your fex and puts them in to a default html launch page. you can then open that html page in whatever editor you like (front page, dreamweaver, notepad ) and tinker with it to make it suit you.
If you are in win2k, say, and your fexes are on your edapath/apppath, then a default FORM on an html launch page could look like this:
<FORM name='form' action="http://grwf01/cgi-bin/ibi_cgi/webapi.dll" TARGET='main'  method='get' >
 
<INPUT TYPE="hidden" name="MYPARM1"  value = "MYVALUE1">
 
 <input type="hidden" name="IBIF_ex" value="FEXNAME">
...and if you're using iwa, then
 <input type="hidden" name="USER" value="<%= request.servervariables("LOGON_USER") %>">

 ...now all your parms
<input type=text name=MYPARM2 ...>
<SELECT>...etc
</SELECT>
</form>

If you want to use servlet as your engine, then change the action to HTTP://grwf01/ibi_apps/WFServlet

Please edit your profile/signature on this board to tell us what your system is.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID