Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7597 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to write a script to navigate from the main file, the user interface, decide which of 6 DB's has the actual file and goto the related record. Up until now I've known which DB to return to and written the main file script to have the related file script as the last line. That way I leave the main file and stay in the related record in the related DB. With six DB's to chose from I can't use the same method. I haven't been able to write a script to leave the main file and stay in the correct related DB. Any ideas? I use a work request# as a key field. Only one main record and one related DB record share this key. Unfortunately the related record could be in any one of the six DB. Any help would be appreciated.

Posted

Hi gman,

I suppose you could use a construction like:

(main file script)

If not (IsEmpty(RelationToFile1::request#))

Goto Related Record (RelationToFile1)

Perform Script (External Script in File1)

else

If not (IsEmpty(RelationToFile2::request#))

Goto Related Record (RelationToFile2)

Perform Script (External Script in File2)

:

etc

:

Endif

With the External Scripts in the 6 related databases ending with a 'halt script' or exit script' scriptstep.

Hope this helps,

Regards,

Ernst.

Posted

another approach but the same idea would be..

Main File:

set error capture on

Open (File 1)

find work request

if Status(current error) = 401

open (file 2)

find work request

if status(current error) = 401

open (file 3)

end if (from file 2)

do what you want

end if (from file 1)

do what you want

Sorry if this is confusing, but what it should do is do a find in each file. if it does not find the record, it will do a find in the next file, and so on. When it finds it it will take you to that record in that file.

The other soultion is probably better. I tend to do things the hardest way possible.

This topic is 7597 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.