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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

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

vsrilekha
1-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
posipova
20-Turquoise
(To:vsrilekha)

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

View solution in original post

1 REPLY 1
posipova
20-Turquoise
(To:vsrilekha)

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

Top Tags