Using Goto

Hello,

 

I'm trying to use the Goto function to search for a specific ID in our module.  Here's what I have so far:

findReplaceModule_ = current
evalTop_ (NLS_("findReplaceGoto_ tabGoto_"))

 

However, all this does is opens to Goto window.  I still do not know how to input text into the window and select the Goto button. 

 

Please help. Thanks.


brobl - Fri Jul 05 16:01:11 EDT 2013

Re: Using Goto
Mike.Scharnow - Sun Jul 07 15:25:08 EDT 2013

Hi,

 

Not sure, what you're trying to achieve, but perhaps you are looking for the following? (e.g. you want to go to object with absolute number 24)

current = object(24)

Hope this helps,
Mike

Re: Using Goto
brobl - Mon Jul 08 09:31:34 EDT 2013

Mike.Scharnow - Sun Jul 07 15:25:08 EDT 2013

Hi,

 

Not sure, what you're trying to achieve, but perhaps you are looking for the following? (e.g. you want to go to object with absolute number 24)

current = object(24)

Hope this helps,
Mike

I'm just trying to search a module by ID.  I tried using setSearchObject but it seems that ID is not considered an attribute to search by.  If I just search by an absolute number, the ID may not be correct in case it has been deleted. 

 

Thanks for your reply

Re: Using Goto
Mike.Scharnow - Mon Jul 08 09:55:27 EDT 2013

brobl - Mon Jul 08 09:31:34 EDT 2013

I'm just trying to search a module by ID.  I tried using setSearchObject but it seems that ID is not considered an attribute to search by.  If I just search by an absolute number, the ID may not be correct in case it has been deleted. 

 

Thanks for your reply

Sorry, but I still don't understand completely what you want to do.

What shall happen with the object you found? Shall it just be activated, so that the user, after the script has finished sees this object? If so, the code snippet above should help.

If you need this object for performing some further processing, you can also use the function "object", e.g. 

Object objCalculateMe = object(24)
string sReqType = objCalculateMe."Requirement Type" ""

Why do you want to use the GUI GoTo function?

Re: Using Goto
Mike.Scharnow - Mon Jul 08 10:10:18 EDT 2013

brobl - Mon Jul 08 09:31:34 EDT 2013

I'm just trying to search a module by ID.  I tried using setSearchObject but it seems that ID is not considered an attribute to search by.  If I just search by an absolute number, the ID may not be correct in case it has been deleted. 

 

Thanks for your reply

PS: yes, if the object is deleted, you will not be able to activate it. The same is true if your current view has a filter where your object is not shown.

For these cases you can use a construct like 

Module m = current
 
string sSearchit = "3"
 
Object oSearch
 
bool bFound = false
 
for oSearch in entire m do {
 
if (oSearch."Absolute Number" "" == sSearchit) {
 
bFound = true
 
break
 
}
 
}
if (bFound) {
if (isDeleted (oSearch)) {
print "Object is Deleted" 
} else {
 print "The object's identifier is " identifier (oSearch)
}
}