Micro Focus QTP (UFT) Forums
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: Datatable (/Thread-Datatable--6811)



Datatable - Eswari - 09-18-2012

Hi,



I had an issue ,i am checking the valid and invalid data in excel sheet using Datatable.

If i give special characters or number it should give an error msg and it should write fail in result column

for eg:

in flight reservation if i am inserting a new order,if i give specialcharacters or numbers to the name field it should give me an error.

but it is not giving error it is inserting the order.

Thanks all for ur worderful replies in advance.



Thanks,

Eswari.


RE: Datatable - ricks_ngl - 09-20-2012

Write a small macro in the excel sheet itself to do this taks. It would be very easy to handle in macros.

1. Take the column having the name
2. For each and every row, check if special char or number exist
3. It can be done by storing the cell value to an array
4. Parse the array and check if any special char or number exist
5. If the condition is met, means it should give a message
6. If the condition is not met, no need to give message
7. You will be done


RE: Datatable - Eswari - 09-20-2012

Hi,
Thanks for ur reply.
Actually the excelsheet should accept the specialcharacters & numbers,
The application on which i am testing through QTP should not accept it.
Pls anyone help me to resolve this problem

Thanks,
Eswari.