Micro Focus QTP (UFT) Forums
need to add a "wildcard" to an image in my statement - 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: need to add a "wildcard" to an image in my statement (/Thread-need-to-add-a-wildcard-to-an-image-in-my-statement)



need to add a "wildcard" to an image in my statement - LJENNE - 12-15-2011

Greetings,

I'm pretty much a novice user of QTP. I can write simple scripts to perform simple actions with few to no variables.

I need to build a wildcard so my script will "add a new row" despite which row it is. Example "Add a new row at row x"

Here is part of the script:
.Image("Add a new row at row 1").Click


Any advice?


RE: need to add a "wildcard" to an image in my statement - Ankesh - 12-16-2011

where do you want to add a new row? What do you mean by wildcard? Are you trying to make a reusable function? Please elaborate your requirement.


RE: need to add a "wildcard" to an image in my statement - LJENNE - 12-17-2011

Greetings. Thanks for posting. Yes I think I want to make a reusable function. The row number is a variable so the function needs to be dynamic. I want to add a new row "at the next row" rather than "at row 1"
Using excel as an example...I need the statement to function similar to the anchoring function in an excel formula where the formula calculates for the next row eg =IF($C2=$C1,2,0)

I hope I am helping to clarify.