- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
RE: Invalid Row Number Error
Hi,
I was just wondering about this error I got when I ran my script:
Invalid Row Number{92} in access or evaluation of 'Subscript' , colInstructions[q]
The value of q never reaches 92 so I'm not sure where that number came from, or is 92 in relation to something else? Just for some background information I created a new column to which I'm assigning the value of a cell from another data table (colInstructions[q]).
Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
RE: Invalid Row Number Error
Make sure the cell is fully qualified with the table name and column name. If both tables have the same column name you might get this error, i.e. one table doesn't have 92 rows.
dt1 = data table("Table 1");
dt2 = data table("Table 2");
column(dt2, "Instructions")[92] = column(dt1, "Instructions")[14];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
RE: Invalid Row Number Error
Ok thanks,
Both tables don't have the same columns but I have another question related to creating new columns: do you have to specify how many rows the column has when you create a new column and how would you do this?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
RE: Invalid Row Number Error
If you add a new column to an existing data table, the column will have the same number of rows as the data table the new column is being added to. JMP data tables do not have different number of rows for different columns. They may have missing values or blank values for character columns, but all columns will have the same number of rows. If you need to add additional rows, you can use "Add Rows()" function. See:
Help==>Scripting Index==>Data Table==>Add Rows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
RE: Invalid Row Number Error
I am stuck with a similar problem.
I have a string in the list and trying to assign it to the row of a data table. I get an erroe saying - "Cannot set value for column beacuse row number is invalid".
Param = {};
Param = Concat items({A, B, C,D}, " ");
dt = New Table( "RAWDATA" );
dt<< New Column( "Line", Character);
Column(dt,"Line")[1] = Param;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content