Focal Point
[SOLVED]Get variable value from fex to html

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

December 30, 2015, 08:29 AM
Bharathi
[SOLVED]Get variable value from fex to html
I have a fex which runs on clicking of a submit button from html page.
There is a variable in fex which gives Y or N based on some logic.

I need to get that value from fex to html.

How can I do it? Please let me know if I am not clear.

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


WebFOCUS 8.1.05
Windows, All Outputs
December 30, 2015, 08:42 AM
Ricardo Augusto
After you logic, create a HOLD format HTMLTABLE then:

-HTMLFORM BEGIN

some html code you need here.

!IBI.FIL.HOLD;


-HTMLFORM END


WebFOCUS 8.1.05 / APP Studio
December 30, 2015, 08:04 PM
Rifaz
Refer this post

[SOLVED] Passing parameters by URL in HTML Composer


-Rifaz

WebFOCUS 7.7.x and 8.x
December 30, 2015, 09:47 PM
vaayu
There's more than one way to do it depending on how you call your HTML from fex.

 
-SET &MYVAR = 'Y';

-HTMFORM MYAPP/MYHTM.HTM
 


In your html form you would just call this by simple !IBI.AMP.MYVAR; in a textbox or anywhere.

Hope it helps!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
December 31, 2015, 04:13 AM
Bharathi
Thank you ..

Pawan,
The code u gave works fine when we call html from fex.
But , I have a html page and on clicking a button, it calls a fex where I am setting a variable. I need to get that variable to html again.
Let me know if I am not clear.


WebFOCUS 8.1.05
Windows, All Outputs
January 04, 2016, 05:21 AM
Pravin.Singh
You can have a hidden component on your html file which will not be visible on the page but can hold value from fex file.
You can put the value like:
TABLE FILE CAR
PRINT
CAR NOPRINT
COMPUTE DDL_VALUE/A20 ='&VAR.EVAL';
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT XML
END

And then populate the data into hidden component from above fex file.

Hope this will help!!


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
January 04, 2016, 08:59 AM
Bharathi
Pravin,

On submitting a button, there's some logic on which a variable is set as Y or N along with some other operation. There is a frame where it gives some status on html page (output from fex). Based on the variable from fex, I have to refresh other frame below. Am I clear?


WebFOCUS 8.1.05
Windows, All Outputs
January 05, 2016, 05:58 AM
Pravin.Singh
It looks like you need to refresh a frame on submit event of button taking the parameter based on other frame operation on the same submit event.
It looks like specific requirement and you can achieve that may be by writing some java script. Sharing the code might be much better to understand.


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
January 07, 2016, 07:20 AM
Bharathi
Pravin,

You clearly understood my requirement.
I am using wf8 appstudio, created an html page.
To write code/logic, I would need that variable value from fex, which I am not able to read. let me know any idea/suggestion on this.
January 07, 2016, 09:40 AM
Ricardo Augusto
Bharathi,

Could you please show your code or draw a single flow of your needs?

See ya


WebFOCUS 8.1.05 / APP Studio
January 12, 2016, 12:21 PM
Bharathi
Instead of accessing html control in fex, I created a function in html page - embedded javascript and called the funtion in fex using parent.function name(),which worked for me.


WebFOCUS 8.1.05
Windows, All Outputs