Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Comparing records from two FM databases (tables)


vinnedb

Recommended Posts

Hi,

 

Is it possible to read record from two FM databases from the same layout? My objective is to create a script that will open two FM databases then read a record from each FM database and make a comparison to find out if the data contains the same value. FM database #1 will have the records that I want to check and FM database #2 will have records that I want to compare against.

 

You help is appreciated!

Link to comment
Share on other sites

Hi.

 

I'd say yes to that. The question is, are the records you wish to compare related in some way? Or do you want to see if the value in field A in record 1 of database 1 is present in field A of any record in database 2?

 

kjoe

Link to comment
Share on other sites

Hi kjoe,

 

At present I want to see if the value in field A in record 1 of database 1 is present in field A of any record in database 2. Basically, what I have is a list of donor names that I want to compare to a donor database to find out if the individual has made a contribution.

 

Your reply is very much appreciated!

Link to comment
Share on other sites

Hi kjoe,

 

One more thing is if you're able to read from two different FM database files in the same layout how would you relate the GO TO RECORD/REQUEST/PAGE to each FM database file?

 

Thank you again!

Link to comment
Share on other sites

All right. So you have no unique ID for each person that happens to be the same in both databases? If not fm generated, then maybe a social security number?

Are we talking about hundreds or thousands of records? I'm thinking of this because a simple compare of mrs. Jones to mrs. Jones will hardly be trustworthy. You could score multiple hits, especially if the files are big.

Maybe a concatenation of lastname&zip&phone could give you a sufficiëntly unique string to compare.

There is the risk of typos so the match will not turn up. But if you relate both concatenated fields you can make a direct comparison, record to record.

 

 

kjoe

Link to comment
Share on other sites

Hi kjoe,

 

Thanks again for your quick response.

 

Yes. It's true that I have no unique id for the list that was given to me but I thought it would be a good opportunity to do this exercise. I am especially interested on how to read records from multiple FM database files.

 

What I've done so far is that I've create concatenated fields for the First + Last names in both databases which will be used to do the comparision. The next task is to read a record from database#1 then prompt a script to compare the nameset(#1) against all the records in database#2. If there's a match, I then write the found name set to another database(#3) file. If there's no match, the next record in database#2 is compared until all the records have been checked. The script will end after all the records in database#2 have been read and return the execution to the original layout (database#1) where the next record in database#1 is read, the script to check database#2 is performed and the cycle continues until all the records in database#1 have been read.

 

I think this should give me some answers on how to approach this task.

 

Thank you again for you response!

Link to comment
Share on other sites

Hi.

 

I don't think you need to build a script at all. see sample. It's in v6 as I don't know what version you use.

You can convert into v7. As you can see, it's not completely foolproof but I guess sufficiently useful.

The file that has the comparison is number two. I assumed there could be multiple donations, but it would work just as well if there's only one donation.

 

kjoe

Link to comment
Share on other sites

Hi kjoe,

 

Thank you for the attachments. Your examples were of great help. As for reading multipe database files from one layout I still find this as a challenge. I haven't figured out how to tell the GO TO Record/Request/Page which database file to read from. Offhand, the only way that I can thing of doing this is to write a script that will open another database file.

 

Have a good weekkend!

Link to comment
Share on other sites

The script step that will take you to the first related record of a found set is

 

go to related records [show only related, "relationship name"]

 

You can easily build this into the sample.

 

kjoe

Link to comment
Share on other sites

Hi kjoe,

 

I have one more question on the table comparison which is I noticed that if there's multiple spelling of the last name (ex. smith) FM will only display the first match that it encounters. Is there a way that I can have FM display all occurences of last names with the same or similar spelling?

 

Thanks again for your help!

Link to comment
Share on other sites

You can if you parse the name into strings like

 

s

sm

smi

smit

smith

smiths

 

using a stored calc left(field;1) &"¶"& left(field;2) &left(field;3)&"¶"& ###etcetera

 

and make a relationship between that and the NameField in the other table. then make a portal based on this relationship.

I guess this would also work when using a concatenation, as long as storing / indexing is possible.

 

kjoe

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use