Focal Point
[CLOSED] Pass parameter from fex to html, then to fex

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

September 09, 2014, 02:53 PM
hainguyen
[CLOSED] Pass parameter from fex to html, then to fex
This is my process. I have FEX1.fex file, in this fex file, I set value for parameter: &SITE. Then, I pass this parameter to HTML file which contains GRAPH by using inputhidden and set value to this control is '!IBI.AMP.SITE!'. This works perfect. Then I want to drill down GRAPH base on that parameter and another value in the graph to another fex file (FEX2.fex). In the drill down code, if I use:
FOCEXEC=app/FEX2(STAGE=HOLD_STAGE.CVP_STAGE SITE=&SITE), $  

FEX2.fex didn't recognize the value of SITE parameter and it returned me blank value for this parameter.
Any suggestion for me in this case?
Thanks in advance.

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


WebFOCUS 7.7.03
Windows, All Outputs
September 09, 2014, 03:00 PM
Cyril Joy
quote:
SITE=&SITE

Can you set '!IBI.AMP.SITE!'as input to a hidden variable in the HTML file and submit to fex2 on click using a javascript?

Regards,
Cyril Joy.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
September 09, 2014, 03:24 PM
MartinY
Try : SITE=&SITE.EVAL


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
September 09, 2014, 03:46 PM
hainguyen
Cyril: Can you give me your sample code? I don't really get your suggestion.
Martin: I tried that and got the same result, the SITE value in FEX2 is still ' '.


WebFOCUS 7.7.03
Windows, All Outputs
September 09, 2014, 04:16 PM
Cyril Joy
You can add an hidden variable in html. I have not tested below code. You can write something similar.

  

<html>
<script language="Javascript">
function myfunc()
{
document.form.method='post';
document.form.action='location for fex2';
document.form.submit();
}
</script>

<form name=test>
<input type="hidden" name="site" value="IBI.AMP.SITE;">
<input type="hidden" name="IBIF_Ex" value="fex2">
</form>
<html>

In the fex file, call the above javascript,myfunc and pass any parameters as required to the javascript.





Regards,
Cyril Joy.

WF Production 8008 on Linux.
September 09, 2014, 06:25 PM
hainguyen
Thanks Cyril, I haven't tried your solution yet but I figured out how my code didn't work. In my HTML, I just need to set value for the inputhidden is: !IBI.AMP.SITE; , not '!IBI.AMP.SITE;' so the fex2 can read this parameter.


WebFOCUS 7.7.03
Windows, All Outputs
September 10, 2014, 02:23 AM
Dave
Or check my tip at:

http://forums.informationbuild...887079176#1887079176


_____________________
WF: 8.0.0.9 > going 8.2.0.5