cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy the values of one infotable with row count of 33 into an infotable with row count 35

SOLVED
Highlighted
Newbie

How to copy the values of one infotable with row count of 33 into an infotable with row count 35

Hi all,

               I have an infotable1 (list) in which there is a field called hours(rowcount is 33)

I have another infotable2 (Monthavg) of the same datashape as linfotable1 but the rowcount is 35


var rem = me.Monthavg();


for(j=0;j<count;j++)  //Here count is row count of Infotable 2 (that is 35)

{

    var rec ={ };

   if(rem.rows!= undefined)

    {

    rec.days = rem.rows.days ;

    }

 

    if(rem.rows== undefined)

    {

    rec.days = 0;

    }


infotable2.AddRow(rec);

 

}

For this code snippet I'm getting this error

where 33 is the row count of  infotable 2 (rem in the above code)

How do I copy values? What is the alternative here?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to copy the values of one infotable with row count of 33 into an infotable with row count 35

Try myinfotablename2.rows[35].fieldname = myInfotablename1.rows[33].hours

View solution in original post

1 REPLY 1
Highlighted

Re: How to copy the values of one infotable with row count of 33 into an infotable with row count 35

Try myinfotablename2.rows[35].fieldname = myInfotablename1.rows[33].hours

View solution in original post

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!