Focal Point
[SOLVED] pass variable

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

January 15, 2009, 12:20 PM
Spence
[SOLVED] pass variable
Is it possible to pass a variable along with the focexec ARHC0130S in this example? The code
was generated in developer studio. The html is run from a focexec that sets the variable that I need to pass.

  <request requestid="1" sourcetype="typeFex" targettype="0" targetname="iframe1" ibif_ex="ARHC0130S" ibic_server="EDASERVE" ibiapp_app="masterfiles menureports">

This message has been edited. Last edited by: <Kathryn Henning>,


WF 8 version 8.2.04. Windows.
In focus since 1990.
January 15, 2009, 02:02 PM
FrankDutch
How did you generate this code?

Do you have an parent and a child fex?
If so you probably have a line of code that executes the fex.
You can put some variables in that line something like
(VAR1=N1 VAR2=N2)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 15, 2009, 02:16 PM
Spence
frank,

there is only one fex, no parent and child.

the code is being run from an asp page.
the asp page captures the active directory userid and then calls the focexec.
the focexec sets the ad username to a variable.
the focexec then does -htmlform begin and populates drop down boxes and executes a report from a button. i would like to be able to pass the ad variable along with focexec that gets executed. that is the line of code shown above.

i don't think it can be done this way.


WF 8 version 8.2.04. Windows.
In focus since 1990.
January 15, 2009, 02:47 PM
susannah
Spence
you add a line of code to your generated html form (the stuff between the -htmlform begin and end)

to pass a new variable in an input tag
type=hidden name=advariable value = &somevalue

ok? or do you need more?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 15, 2009, 03:11 PM
Spence
that helps. thank you susannah.


WF 8 version 8.2.04. Windows.
In focus since 1990.
December 08, 2013, 10:40 AM
Piter
quote:
Originally posted by susannah:
Spence
you add a line of code to your generated html form (the stuff between the -htmlform begin and end)

to pass a new variable in an input tag
type=hidden name=advariable value = &somevalue

ok? or do you need more?


Sorry, for coming back to so old post.

Can anybody advise - what is absolute minimum to write in VARIABLES and INPUT_CONTROL section in such cases?

i.s. I create hidden input in my HTML part:
  	<INPUT id=PROD_P  type=hidden value=&PROD_P name="PROD_P">

Then to pass PROD_P to some fex (later i use var &PROD_P) I use such code.

  

 <variable field="PROD_P"  name="PROD_P"  >
	<link linktype="default" from="PROD_P">
            <condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
                <data_info >   </data_info>
            </condition>
        </link>
       		<requestid id="6">  </requestid>
</VARIABLE>


<input_control bindcontrolid="PROD_P" name="PROD_P" id="PROD_P" multiple="0" elementtype="8" inbinding="1"  onetimepopulated="1" unresolved="0">
    <link linktype="default" persistentuniqueid="PROD_P">
    <condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
        <data_info datatype="0" modifiedrequest="0" datasource="" ibif_ex="" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" accept="0" operation="NONE">    </data_info>    </condition>    </link>
   </input_control>


But there are so many lines/params/variables. What I can skip?


Wf7704/WF8,Win64/32
December 09, 2013, 04:42 AM
Tony A
It looks as thought you've used composer to build the original and are trying to add a new one manually.

My advice? Don't even try, as you can easily miss components for the control. Open again in composer and add the control there.

T

This message has been edited. Last edited by: Tony A,



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 
December 09, 2013, 09:41 AM
Piter
Tony,

Originally I was using DevStudio. Today as I like to have full control of code plus use corporate styles. Therefore, I am doing html manually.

May be I am too dummy, but I have not find any way how to pass HTML variables to fex. So, I am writing manually INPUT_CONTROL part (i.e. to fill drill downs, other controls) and I am writing manually VARIABLES part to pass values to variable in FEX.

Is there any better way to do things without DevStudio?

I know - it is possible to use ajax to fill controls and kind of '/ibi_apps/WFServlet?IBIF_ex=procedure.fex&PARAM1=' technique to pass variables. Is it the only way? Any place to read about alternatives in internet?


Wf7704/WF8,Win64/32
December 09, 2013, 10:32 AM
Tony A
Piter,

The trouble with trying to use a hybrid HTML page is that the control code within the "composed" source will have a certain way that the parameters are gathered and included within the called URL.

There are basically three components to the "newer" (relatively speaking) composer creation that, unless you are fully conversant with it, can cause you many headaches (just ask Francis Wink).

My advice can be clarified by - either use composer in full or write your own from scratch.

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 
December 09, 2013, 11:10 AM
Francis Mariani
Here is an example of an HTML page with the minimum HTML code required to execute a fex in MRE. In this example, there are three controls, a text box, a radio button set and a list box. The submit button executes 1 fex.

<!doctype html>
<html lang="en">
 <head>
  <title>Test</title>
 </head>
 <body>
  <form method="post" action="/ibi_apps/WFServlet">
    <input type="text" name="PARM1">
    <input type="radio" name="PARM2" value="parm2 vala">RB1
    <input type="radio" name="PARM2" value="parm2 valb">RB2
    <select name="PARM3">
        <option value="parm3 val1" selected>parm3 val1</option>
        <option value="parm3 val2">parm3 val2</option>
    </select>
    <input type="submit" value="Submit">

    <input type="hidden" name="IBIMR_action"     value="MR_RUN_FEX" />
    <input type="hidden" name="IBIMR_sub_action" value="MR_STD_REPORT" />
    <input type="hidden" name="IBIMR_domain"     value="treasury/treasury.htm" />
    <input type="hidden" name="IBIMR_folder"     value="#testz0204u3f" />
    <input type="hidden" name="IBIMR_fex"        value="app/test1.fex" />
  </form>
 </body>
</html>

If the HTML runs a fex that is not in MRE, you only need this hidden variable:
<input type="hidden" name="IBIF_ex" value="test1" />



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 10, 2013, 04:09 AM
Tony A
quote:
Here is an example of an HTML page

Precisely, hand cranked OR composer NOT a hybrid - unless you get all (and are prepared for!) the pre-requisites of the composer style of coding.

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