Micro Focus QTP (UFT) Forums
AddParameter method does not add in first column of datatable - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: AddParameter method does not add in first column of datatable (/Thread-AddParameter-method-does-not-add-in-first-column-of-datatable)



AddParameter method does not add in first column of datatable - alpha1 - 07-05-2015

Hi,
If am using Datatable's AddParamter method, it adds the column not in place of first column "A" but adds it to next column. Eg,

Code:
Datatable.GetSheet(2).AddParameter "username","Ritika"        Datatable.GetSheet(2).AddParameter "pwd","hello"
wait  4

Should't it change first column name as "username". It is adding second column of datasheet as "username" . Pls see screenshot attached.


RE: AddParameter method does not add in first column of datatable - supputuri - 07-07-2015

Do you see an active row in sheet 2 before hitting "Datatable.GetSheet(2).AddParameter "username","Ritika" " this line of code. Then might have entered some value in A1 cell. Try to delete the row and then try again.


RE: AddParameter method does not add in first column of datatable - alpha1 - 07-08-2015

Hi,
Thanks for help! yes you are right, the first row shows activated in global as well as action1 sheet. Though i don't remember entering any data in this. However when I try to delete the row using Ctrl+k or rightclick+edit+delete it doesn't delete the row. So, I write this script in new test & it works as first row is not activated in this new test. So, thanks so much !

But is there anything like if first row in global & Action1 sheet is once activated we can't delete it?


RE: AddParameter method does not add in first column of datatable - alpha1 - 07-11-2015

Hi guys pls reply, "But is there anything like if first row in global & Action1 sheet is once activated we can't delete it?"


RE: AddParameter method does not add in first column of datatable - supputuri - 07-14-2015

Hey sorry for the late reply, are you looking at the run time data table?
To confirm whether the details are added from the first column, just open your results and then click on "View>Data". Can you please share the screenshot of that runtime data table.