0 Replies Latest reply on Aug 7, 2007 5:29 PM by GeorgeWS

    HELP!!!

    GeorgeWS Level 1
      I am baffled for a week now.

      I have a datagrid that gets filled in with an ArrayCollection. One column is a check box called "Include" So I would check a few records (rows) and then I have some formfields. I want the form fields to get appended to each datagrid record. I have this:

      private function update():void {
      var myobj:Object = new Object();
      myobj.dba = dba.selectedLabel;
      myobj.itemid = itemid.text;
      myobj.item = item.selectedLabel;
      myobj.programtype = programtype.selectedLabel;
      myobj.status = status.selectedLabel;
      myobj.priority = priority.selectedLabel;
      myobj.descrip = descrip.text;
      myobj.followup = followup.selected;
      myobj.trackcomp = trackcomp.selected;
      myobj.preslocal = preslocal.selected;
      myobj.tracksales = tracksales.selected;
      myobj.startdate = startdate.selectedDate;
      myobj.enddate = enddate.selectedDate;
      myobj.followdates = followdates.selectedDate;
      cfdataInsert.addData({user:myobj})
      //This is the part I am confused about!!
      for (var i:int = 0; i < myAccounts.length; i++ ) {
      var aAccounts:Account = myAccounts ;
      cfdataInsert.update( aAccounts ) ;

      }//end for loop
      }

      The "myObj" parts works. I dont know how to update the arrayCollection (myAccounts) so that when Include is true add the form fields to this and then INSERT into a DB.

      I need to see a simple sample I am using a RemoteObject for the call to fill the Datagrid. and another remote Object to send the results. Can anyone help me with the syntax?

      Thanks
      George