Forum Discussion
Is the variable on the left also a string?
- jw253 years agoOccasional Contributor
Not entirely sure which variable you are referring too. Theres three variables in this problem. The ArtNumChkT is a table variable. The counter variable, which is an integer. It's simply there to help me go trough the table. Lastly the ChkTrimArtNum is a parameter in the script function. I haven't seen any options to specify that the table or the parameter should be a string so I assume TestComplete figures that out itself.
In the Debug mode I can see that it takes and uses the value in the parameter so that should be fine. However the aqString object might not work if it does not consider it a string. - jw253 years agoOccasional Contributor
So I made some progress, or so i think.
function TrimArtNum (ChkArtNumTrim){ Log.Message(ChkArtNumTrim); var counter = Project.Variables.Counter; var ArtNum = Project.Variables.ArtNumChkT.Item(0, counter); ArtNum = aqConvert.VarToStr(ChkArtNumTrim); ArtNum = aqString.Remove(ChkArtNumTrim,0,15); Log.Message("test " + ArtNum); Project.Variables.ArtNumChkT.$set(" Project.Variables.ArtNumChkT", 0, 0, ArtNum); }
I added a second variable (ArtNum). Artnum goes trough the code properly. What still remains though is saving this value to the cell. I figured this is where i'd use the set method I've been reading about. However, now I get another error:
Error: The object does not support this property or method. It referring to the %set line.
Related Content
- 4 years ago
- 5 years ago
Recent Discussions
- 6 hours ago
- 7 days ago
- 10 days ago