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



Parameter - bistritapcv - 04-02-2013

Search doesn't seem to be working so forgive me if there is this topic already. I have done google searches and found nothing.

I have a data sheet with four columns:


LOW HIGH STREET MESSAGE

100 200 Any Street Request added for 100-200 Any Street
400 700 Washington Request added for 400-700 Washington
600 300 Elm Error LOW must be lower than HIGH


MESSAGE is entered manually. What I would like to do it have MESSAGE
be dependent on the others like this:

Request added for $LOW-$HIGH
so if LOW and HIGH change I don't have to update message. I still have to type the error case. What would really be nice is something like

if LOW < HIGH
then
Request added for $LOW-$HIGH
else
Error LOW must be lower than HIGH
end

but that won't really work so well because I will have other errors like LOW is blank or HIGH is blank. But if I could at least make MESSAGE dependent on the LOW and HIGH I could copy it and the few places where there are exceptions I could just overwrite it. How can I do this?

Thanks

Sorry, the columns did not line up so well ;-) Let me try with underscores to preserve spaces


LOW____HIGH____STREET___________MESSAGE

100_____200_____Any Street________Request added for 100-200 Any Street
400_____700_____Washington_______Request added for 400-700 Washington
600_____300_____Elm Street________Error LOW must be lower than HIGH