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

Transporting a Find from one layout/table to another


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

Recommended Posts

Posted

Howdy, all:

I just want to see if my logic is correct in what I want to do:

Goal: to find all records in Layout/Table B using Find criteria Layout/Table A.

I have a field in Layout/Table A called SerialNumber. There's also a field in Layout/Table B called SerialNumber which, as it so happens, is the field used to connect to Layout/Table A in a one-to-many relationship, i.e., A -< B.

What I want to to do is take Layout/Table A's different serial numbers and find them in Layout/Table B. So, say for example you have two records in the found set for Layout/Table A: one with SerialNumber 123456 and the other 654321, and there are dozens of records in Layout/Table B, some of which have a serial number of either 123456 or 654321 and the others don't. How would I script a Find to find those serial numbers in Layout/Table B with the found set of serial numbers in Layout/Table A?

I know I'll probably have to loop some part of this but I don't know how to attack the problem beyond that. Any ideas? TIA for your input!

Posted

It's actually easy: use Go To Related Record, and select the "Match all records in current found set" option.

Posted

*heavy sigh* Thanks, Fitch. Leave it to me to find the most roundabout, convoluted, way of performing a Find...

Posted

If it makes you feel any better, there certainly are times when something like your original concept is necessary. The typical solution is to create a global text field to store a list of IDs; create a relationship between this global and the child key field; and finally, create a script to loop through the parent records to build an ID list, store it in the global field, then GTRR.

  • 2 months later...
Posted

Hi Fitch & Rich and all,

I read your posts here above and need some more help about post # 4 wich seems to be what I'm looking for

here is my specific situation:

I have a file named ADDRESSFROMPEOPLE wich I'm trying to correct using official data from another file named ADDRESSFROMMAILSYS.

In order to fix the not perfect values in the STREETNAME field of file ADDRESSFROMPEOPLE, I think to copy (and/or store in a variable or somewhere else temporarily) STREETNAME + CITYNAME and then make a FIND with those two values in the other file ADDRESSFROMMAILSYS.

In this way I should find the rekord of that specific street in the ADDRESSFROMMAILSYS file with all its official values.

At this point, I think to copy and paste all the data I need from fields of ADDRESSFROMMAILSYS back to corresponding fields in ADDRESSFROMPEOPLE, and the job is supposed to be done. (in a horrific way, but it is a minor issue)

Well, i simply do not know how to make a FIND in file B with find criteria picked up from file A.

Variables can be used to store and retrieve values only if in the same file, isnt'it?

By the way, a "portal strategy" to show data from file B in a portal placed in file A and then move data inside the same file, does not seem to work in this situation because the value people wrote in STREETNAME is too far from what it should be (they write G. WASHINGTON or G WASHINGTON or WASHINGTON but they never write GEORGE WASHINGTON) so I can not trigger the relation.

I hope it is clear.

Any idea or trick? Thanks

Posted

This is a little different from the original question, but OK...

You can create a Find script in file B, and from file A you can call that script and pass your search criteria as a script parameter.

Or, you could create a table occurrence and layout in file A that are based on a table in file B. That way you can do all the scripting in File A.

If you're not familiar with how to pass multiple parameters to a script, this will get you started:

http://www.geistinteractive.com/2011/07/18/passing-multiple-parameters

Posted

Hi all and Fitch,

sorry but today I had no time to try your multiple parameters strategy so I must double check making a probably stupid question just because night is coming here in Italy and in a few hours in USA too.

If I understand, parameters "stored" in a script executed in file A will be retrievable from another script in file B, is it?

It seems they are actually stored in FM application itself regardless of the file they are coming from or going to. Right?

Can you confirm this?

During the night I'll try it.

See you later. Thank

Posted

You could say that a parameter is "stored" by a script, but that might be a bit confusing -- it's only stored while that script is running. During that time, the parameter can be called anytime within that script. For other scripts to "see" the parameter, that script has to pass its parameter to the sub-script.

In other words, Script B has no way to know what Script A's script parameter is. It only knows what script A has passed to it. If that happens to be Script A's script parameter, so be it, but it could be any arbitrary data.

It doesn't matter what file the scripts are in, correct.

Sorry for the delayed response.

This topic is 4670 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.