Patrick Huebgen Posted February 26 Share Posted February 26 Just received this question from a customer outside of the community but I think this might be useful - so sharing it with you https://youtu.be/Dt5MIBm0SnE 2 Link to comment Share on other sites More sharing options...
Patrick Huebgen Posted February 26 Author Share Posted February 26 Here's the full fex code -SET &ECHO=ALL; -SET &&GLOBALVAR='This is a global variable'; -SET &SALES=''; -SET &COUNTRY=''; TABLE FILE CAR BY CAR WHERE COUNTRY EQ '&P_COUNTRY' ON TABLE HOLD AS TABLE1 FORMAT HTMTABLE ON TABLE SET PAGE-NUM NOLEAD END TABLE FILE CAR SUM SALES NOPRINT BY HIGHEST 1 TOTAL SALES BY COUNTRY WHERE COUNTRY EQ '&P_COUNTRY' ON TABLE HOLD AS VALUES FORMAT ALPHA ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET HOLDLIST PRINTONLY END -RUN -READFILE VALUES -SET &SALES=TRUNCATE(&SALES); -SET &COUNTRY=TRUNCATE(&COUNTRY); -HTMLFORM BEGIN <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Sample</title> <script type="text/javascript"> window.onload = function() { alert("Best Country is !IBI.AMP.COUNTRY;"); }; </script> </head> <body> <h1>WebFOCUS Magic with HTML</h1> <table border="1"> <thead> <tr> <th>Name</th> <th>Variable Content</th> <th>Type</th> </tr> </thead> <tbody> <tr> <td>Date</td> <td>!IBI.AMP.DMYY;</td> <td>System Variable</td> </tr> <tr> <td>Table</td> <td>!IBI.FIL.TABLE1;</td> <td>Whole Table</td> </tr> <tr> <td>Some text</td> <td>!IBI.GLB.GLOBALVAR;</td> <td>Global Variable</td> </tr> <tr> <td>Some text</td> <td>!IBI.AMP.SALES;</td> <td>Variable from FEX Logic</td> </tr> </tbody> </table> </body> </html> -HTMLFORM END Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now