return function
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
return function
what does return mean in this case?
I am trying to search a value from group of records in a grid and should match the OrderID(value from different grid)
if(equal(Grid.wValue(i,"Order ID"),OrderID))
return i;
return -1;
if I run this it doesnot show anything in message .I am not sure whther matching happening or not.
any suggestions please
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is nothing in this code snippet that has a Log.Message so that makes sense that nothing is logging.
All this is is doing returning the value i (you have only provides a small section so I don't know what i is) if the equal comparison returns true, otherwise it's returning -1.
Where are you calling this and what is the call doing with the return value?
Thanks,
Carson
Click the Accept as Solution button if my answer has helped
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check the following, specifically the "Function Return" section.
https://www.w3schools.com/js/js_functions.asp
This is a basic coding keyword. The function executes and then a value is returned based upon what is indicated in the "return" line.
As mentioned in other questions from you, it would do you good to go take a tutorial on basic script coding languages like JavaScript.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
