Focal Point
Select row(s) to process from a upload csv file

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

October 27, 2008, 06:16 PM
<dksib>
Select row(s) to process from a upload csv file
I am inserting a check box in front of each row of data in an HTMTABLE output, and/or an array that populates an html TABLE. My issue is when I select the boxes for the rows and hit the submit button it gives me a script error that states something about a NULL instead of an object.

Does someone have a same that I see so that I can select row(s) from a report to process?

Thanks,

David Sibert
October 28, 2008, 03:20 AM
Tony A
David,

Rather than us supply you, try and put your style of code around the CAR file and post that code so we can point you in the right direction. By pointing out what is going on in your code, you have a better chance to comprehend than just following?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 28, 2008, 04:47 PM
<dksib>
Here is my code.
DEFINE FILE ADJUSTMENT_FORM_WEEK
CNTA/I2 = 1 + LAST CNTA ;
CBNAME/A6 ='TEST'||EDIT(CNTA);
CHK_BB/A100 = '<input type="checkbox" name="TEST" id="'||CBNAME||'" value="'||EDIT[CNTA)||'" >';
POSDT/I8L =     POSETTLEMENTDATE;
POSDTA/A8DMYY =EDIT(POSDT) ;
INRDDT/I8L = INITIALRECDDATE;
INRDDTA/A8DMYY =EDIT(INRDDT) ;
BRSAA/I3 = BRANCHREPLOCATION ;
BRREPL/A3 = EDIT(BRSAA,'999') ;

CAAC/A30 = FTOA(CONTRIBUTIONADJUSTMENTAMOUNT,'D21.2',CAAC);

END

TABLE FILE ADJUSTMENT_FORM_WEEK
PRINT
CHK_BB
     BRANCHREPID    AS 'Branch,Rep ID'
     CLIENTACCOUNTNUMBER  AS 'Client, Account #'
     CLIENTNAMELASTNAMEFIRSTNAME AS 'Client, Name'
  POSDTA
     CGF
     CONTRIBUTIONADJUSTMENTAMOUNT AS 'Contribution,Adjustment,Amount'
  CAAC
     SSN_TIN AS 'SSN/TIN'
     BRANCHREPCORPID AS 'Branch Rep,Corp ID'
     BRANCHREPNAME   AS 'Branch,Rep,Name'
  BRREPL AS 'Branch,Location'
     LEADSOURCE    AS 'Lead Source'
  INRDDTA
BY BRANCHREPID    AS 'Branch,Rep ID' NOPRINT
-*ON TABLE HOLD AS HLD11 FORMAT HTMTABLE
ON TABLE HOLD AS HLD11 FORMAT COM
-*ON TABLE PCHOLD FORMAT COM
END


-HTMLFORM BEGIN
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<script id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<script id=IBI_OptionsScript type=text/javascript>
var rltVersion = "764";
var cgipath = "cgipath";
var ibirls = "ibirls2";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<script id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>

<script id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>

<script id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);</SCRIPT>
<TITLE>HtmlPage</TITLE>
<script id=clientEventHandlersJS type=text/javascript>
function window_onload() {
UpdateData();
}
</SCRIPT>
        <script type="text/javascript">
            window.onload=function(){
                document.getElementById("row_add").onclick=function(){

-DEFAULT &FFROW = ' ';
-READ HLD11 &FFROW.A300 NOCLOSE
-TYPE &FFROW
-SET &ADDROW = 'addRow(['|| &FFROW ||']);' ;
&ADDROW.EVAL
-*    addRow(['1','2','3','4']);
                }
            }
            function addRow(dataArr){
                var tr=document.createElement('tr');
                var len=dataArr.length;
                for(var i=0;i<len;i++){
                    var td=document.createElement('td');
                    td.appendChild(document.createTextNode(dataArr[i]));
                    tr.appendChild(td);
                }
                document.getElementById('tbl_bdy').appendChild(tr);
            }
        </script>
    </head>
    <body>
-*GOTO MIEA ;
        <table>
            <thead>

                <tr>
-*                        <th>SELECT</th>
                    <th>Branch Rep ID</th>
                    <th>Client Account #</th>
                    <th>Client Name</th>
                    <th>PO Settlement Date</th>
                    <th>CGF</th>
                    <th>Contribution Adjustment Amount</th>
     <th>SSN/TIN</th>
     <th>Branch Rep Corp ID</th>
     <th>Branch Rep Name</th>
     <th>Branch Location</th>
     <th>Lead Source</th>
     <th>Initial Received Date</th>
-MIEAX
                </tr>
            </thead>
            <tbody id="tbl_bdy">
            </tbody>
        </table>
-MIEA
-*!IBI.FIL.HLD11;
<input type="button" id="row_add" value="Add Row" />

<INPUT language=java_script id=button1 onclick=button1_OnClick[this) tabIndex=3 type=button size=14 value=Submit name=button1>
-*<INPUT id=reset1 style="Z-INDEX: 4; LEFT: 230px; WIDTH: 50px; POSITION: absolute; TOP: 475px; HEIGHT: 20px" tabIndex=4 type=reset value=Reset name=reset1>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=fcs_a456823 name=ibiapp_app>
<xml id=ibi_requests>
<script>
<requests>
<request requestid="0" sourcetype="typeFex" targettype="window" targetname="_blank" ibif_ex="orders1.fex" ibic_server="EDASERVE" activereport="0" reportcolumns="" ibiapp_app="fcs_A456823">
<variables>
<variable field="TEST01" file="sqlout.mas" desc="ASOF_YEAR" datatype="0" operation="" default="y" name="TEST" textvarname="" accept="0" type="default" select="0" min="" max="" controltype="7" create="1"></variable>

</variables></request></requests></script>

</xml></BODY>
-*<script id=IBI_loader type=text/javascript>
-*getActiveReportJscript();
-*setUserInfo();
-*</SCRIPT>
</HTML>
-HTMLFORM END

This message has been edited. Last edited by: Kerry,
October 28, 2008, 04:49 PM
<dksib>
here is the part that was missed:

<INPUT language=java_script id=button1 onclick=button1_OnClick[this) tabIndex=3 type=button size=14 value=Submit name=button1>
-*<INPUT id=reset1 style="Z-INDEX: 4; LEFT: 230px; WIDTH: 50px; POSITION: absolute; TOP: 475px; HEIGHT: 20px" tabIndex=4 type=reset value=Reset name=reset1>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=fcs_a456823 name=ibiapp_app>
<xml id=ibi_requests>
<script>
<requests>
<request requestid="0" sourcetype="typeFex" targettype="window" targetname="_blank" ibif_ex="orders1.fex" ibic_server="EDASERVE" activereport="0" reportcolumns="" ibiapp_app="fcs_A456823">
<variables>
<variable field="TEST01" file="sqlout.mas" desc="ASOF_YEAR" datatype="0" operation="" default="y" name="TEST" textvarname="" accept="0" type="default" select="0" min="" max="" controltype="7" create="1"></variable>

</variables></request></requests></script>

</xml></BODY>
-*<script id=IBI_loader type=text/javascript>
-*getActiveReportJscript();
-*setUserInfo();
-*</SCRIPT>
</HTML>

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