Ask a Question

Error: Member not found. While trying insert values in table variable

SOLVED
karthick7
Contributor

Error: Member not found. While trying insert values in table variable

i m using swing table.i m getting column nd values from table and trying to save in project variables,i m facing Error: Member not found while insert particular data column name: release column value: 3.104S  (Both type is string)

 

kindly help me and get your kudos

 

 

12 REPLIES 12
karthick7
Contributor

I have no more finding,if we use column name as "release" we facing this issue and if we using "testrelease" we don't get any error

 

@shankar_r any suggestions?

 

@tristaanogre any recommendations?

It looks wired, You can create support for your issue here,

 

https://support.smartbear.com/message/?prod=TestComplete


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

tristaanogre
Esteemed Contributor

The error your receiving doesn't sound familiar to me.  It actually sounds like a custom error message.  A quick search of TestComplete help documentation does not come up with that text.

 

Please post your code that you're executing that's generating this message. If it's a keyword test, please include screenshots.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

function fn_StoreClipBoardToTable()
{
     // var defaultColumnLine = 0, defaultRowLine = 1;
      
      var txt_clipboard = Sys.Clipboard;
      var arr_ClipBoardTxt = txt_clipboard.split("\n");
      var columnValues, rowValues,arr_ColumnValues,arr_RowValues;
      
      columnValues = arr_ClipBoardTxt[0];
      arr_ColumnValues = columnValues.split("\t");
      
      
      //Storing Vlaues to Project variable
      
      fn_resetVariable("tbl_CopyToClipBoard");
      var tempValue = "";
      try
      {
            Project.Variables.tbl_CopyToClipBoard.RowCount = arr_ClipBoardTxt.length-2;
      
            for(var sI = 0 ; sI < arr_ColumnValues.length ; sI++)
            {     
                  
                 var tempCol = aqString.Trim(arr_ColumnValues[sI]);
                 if(aqString.Find(tempCol,Chr(13),0,false) != -1)
                 {
                   tempCol = aqString.Replace(tempCol,Chr(13),"",false);
                 }
                  Project.Variables.tbl_CopyToClipBoard.AddColumn(tempCol);
            }
            
            for(var cl=1;cl<arr_ClipBoardTxt.length-1;cl++)
            {
              rowValues = arr_ClipBoardTxt[cl];
              arr_RowValues = rowValues.split("\t");
              for(var sI = 0 ; sI < arr_ColumnValues.length ; sI++)
              {     
                  var tempValue = aqConvert.VarToStr(arr_RowValues[sI]);
                  
                 if(aqString.Find(tempValue,Chr(13),0,false) != -1)
                 {
                   tempValue = aqString.Replace(tempValue,Chr(13),"",false);
                 }
                 
                  var tempCol = aqString.Trim(arr_ColumnValues[sI]);
                 if(aqString.Find(tempCol,Chr(13),0,false) != -1)
                 {
                   tempCol = aqString.Replace(tempCol,Chr(13),"",false);
                 }
                 
                  Project.Variables.tbl_CopyToClipBoard.$set(tempCol,cl-1,tempValue);
                  
                  
            }
            
      }
            return true;
      }
      catch(ex)
      {
           Log.Error("Error Occured:"+ ex.stack)
           
           
     }

}
tristaanogre
Esteemed Contributor

On what line in that code does the error generate?  Have you tried stepping through?

 

Also... what is "fn_resetVariable"? 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

"fn_resetVariable" - just remove data from table and keeping as empty table variable

 

 

Project.Variables.tbl_CopyToClipBoard.$set(tempCol,cl-1,tempValue);

from above line while inserting  

tempCol = "release"
tempValue = "3.041S"

  i m getting as error as member not found     [exception]

tristaanogre
Esteemed Contributor

What it sounds like is that there is no column in your table tbl_CopyToClipBoard with a name of "release".  Based upon your earlier post, the column name may actually be "testrelease".  Please verify that fn_resetVariable is resetting the table properly (post the code for that if possible). 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

I just confirmed what I mentioned.  The error as reported means that you're attempting to set the value of a column in the indicated row for which the column in question does not exist.  

 

So... double check tbl_CopyToClipBoard after the fn_resetVariable is called.  If it does not contain a "release" column, that's your problem.  


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Just now remembered, i was also having same issue later i added additional parameter as "Item" and it worked fine. 

 

Try changing as like below,

Project.Variables.tbl_CopyToClipBoard.$set("Item",tempCol,cl-1,tempValue);

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

cancel
Showing results for 
Search instead for 
Did you mean: