AnsweredAssumed Answered

Script Quick Find search between two files

Question asked by user25648 on Sep 4, 2016
Latest reply on Sep 4, 2016 by user25648

Can anyone help me figure out what I'm doing wrong?

 

I am the administrator (scary)

File A is accessed from a server

File B is local on my laptop

They are related by File A's primary key

 

I would like to automate the search for information from File A using the Quick Find for that information in File B.  If the search finds records, then a field in File B will be set with File A's key.  Essentially, I'm trying to create the linkage in a one-to-many relationship between Files A and B based upon the scripted search.  Using the Quick Find is important because File B is a compilation of information from multiple resources which do not always conform to specific fields.

 

This search involves three local variables created from File A - $searchString  $state  $key

$searchString is the information used in the Quick Find done in File B

$state - I need to constrain the found results to a particular state

$key is File A's primary key which will replace the contents of File B's field linking the two databases

 

My initial problem is that the search, which takes 1 second when done manually, ends up taking forever - I've canceled after waiting several minutes without getting search results. 

 

Below are the script steps I have so far (it presently assumes the File A window is open-active and File B's window is open-inactive)

 

Set Variable [ $key ; Value: FileA::key ]

Set Variable [ $searchString ; Value: FileA::info ]

Select Window [ Name: "FileB Search" ]

Perform Quick Find [ $searchString ]

Constrain Found Set [Restore]

Set Field [ FileB::fKey ; $key ]

 

Thanks for any help or suggestions!

Outcomes