Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

Tips & Tricks video - how to combine the power of WebFOCUS language and HTML


Patrick Huebgen

Recommended Posts

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

  • Paul Thompson changed the title to Tips & Tricks video - how to combine the power of WebFOCUS language and HTML

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...