Micro Focus QTP (UFT) Forums
If Text found - 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: If Text found (/Thread-If-Text-found)



If Text found - mv8167 - 09-20-2012

I have an issue top check if a returned value is text0 or not. Is it possible to check if a value is text, numeric or both?

L


RE: If Text found - parminderdhiman84 - 09-20-2012

To check numeric --- IsNumeric(yourNumber) -- returns Boolean True or False
To check string --- TypeName(yourString) -- returns String if your input value is string


RE: If Text found - mv8167 - 09-20-2012

Thx parminderdhiman84 for responding. But i am not sure if this will work (or not)

I guess i should have done a better job explaining. My issue is this. sometimes the value of my Pages = "None" (or some other text value) and sometimes Pages = 1, 2... etc

If Pages = (TextValue) then Pages = "0"

do I:
If Not IsNumeric(Pages) then Pages = "0"
?

Thx


RE: If Text found - parminderdhiman84 - 09-25-2012

yes that will do the needful