10.2.2. Link to Datasource

Once a layout is created, engineer needs to associate a dynamic field with the desired tag. To associate a data field with a tag, add in a JSON compliant syntax as its data attribute like this: data-igrx="{attr:'get',tag:'tagname'}". Below highlighted section is the sample after adding in the tag links.

<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>IntegraXor Report</title>
        <link rel="stylesheet" type="text/css"
                href="system/styles/igrX.css" />
    </head>
    <body>
        <div id="idButtons" class="paragraph"></div>
        <h1>High Plant Production Report</h1>
        <table width="60%">
            <tr>
                <th>Item</th><th>Description</th><th>Quantity</th>
            </tr>
            <tr>
                <td>1</td>
                <td>Part A</td>
                <td 
                        data-igrx="{attr:'get',tag:'part_a'}"
                     ></td>
            </tr>
            <tr>
                <td>2</td>
                <td>Part B</td>
                <td 
                        data-igrx="{attr:'get',tag:'part_b'}"
                     ></td>
            </tr>
            <tr>
                <td>3</td>
                <td>Part C</td>
                <td 
                        data-igrx="{attr:'get',tag:'part_c'}"
                     ></td>
            </tr>
            <tr>
                <td>4</td>
                <td>Part D</td>
                <td 
                        data-igrx="{attr:'get',tag:'part_d'}"
                     ></td>
            </tr>
        </table>
    <script type="text/javascript" src="./system/scripts/igrX.js"></script>
    <script type="text/javascript">
        var rpt = igrx.report();
    </script>
    </body>
</html>