dbTalk Databases Forums  

Re: merging databases - almost perfect solution

comp.databases.filemaker comp.databases.filemaker


Discuss Re: merging databases - almost perfect solution in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FP
 
Posts: n/a

Default Re: merging databases - almost perfect solution - 09-19-2005 , 10:00 PM






I just want to make sure I understand what you're saying. You have 1
or multiple FileMaker files that you created with scripts, fields etc.
all in a know format, meaning the user can't mess with them.

Now you want to give a user the ability to merge their data with the
data in your file but you don't know what format their data is going to
be in or you want to leave that as flexible as possible.

You also want to allow the user to either replace the data in your file
with theirs, replace only certain portions, or just keep the data in
your file.
To do this you want to display some sort of screen showing your data
and the unknown data along with some dialogs asking the user which
record to keep and if they want to replace, what fields in the unknown
data should be mapped to what fields in your file.

That seems like a pretty tall order. The only advice I can give is
this: it makes sense to use FM to display the 2 sets of data and the
logic of letting the user select which record he wants to keep /
update. This implies your file either needs to link to or contain
fields and scripts for the external data format. That having been said
it means the unknown data must somehow be brought into a known format
and from there you could use plain old FM to do what you want to do.

I wonder if you could import the data into a FM file that just has a
bunch of text fields and then have a preference or template file which
contains records on how to merge the imported data into the known
format that your looking for?


Reply With Quote
  #2  
Old   
FP
 
Posts: n/a

Default Re: merging databases - almost perfect solution - 09-20-2005 , 09:43 PM






Can you use a looping script and SetField.
The data in your file is know so the field that is being set can be
specified. The calculation portion of the set field can be obtained
using things like Get Field.
You could also get the calculation portion of the set field by
assigning some sort of number system to the fields in your excel, csv,
html table. Then you would have a global into which you would put a
number and the set field would know that it should grab the eg. 3 field
in the import data table.

Just a thought.


Reply With Quote
  #3  
Old   
FP
 
Posts: n/a

Default Re: merging databases - almost perfect solution - 09-21-2005 , 04:41 AM



I think I understand what your saying but I might be off. The scenario
I'm thinking of is this, assume you have 3 files:
A (you current main file)
B (an import file you created)
C (the csv file)

File B would contain 10 text fields named Text1, Text2...Text10. All
data files like file C are always imported into the text fields in file
B. This means that you can create whatever scripts you need in file A
or B and be able to reuse the scripts every time a new file C shows up.

Also in File B you would create the global text field "TheOrder" and
ten calculation fields with a calculation like
GetField ( "Text" & Left ( TheOrder; Position ( TheOrder ; "¶" ; 1 ; 1
) - 1) )

Now you would populate "TheOrder" so that the data in the 10 text
fields shows up in the correct order in the 10 calc fields. Assuming
that cal field1 is always going to be your ID field, you could link
from this field to file A.

I would put the looping script in file B since it can look at both
records easily. It can update the data in file A and you should only
have to loop through the records once.

If this is way off in left field then I didn't understand what you were
saying.


Reply With Quote
  #4  
Old   
FP
 
Posts: n/a

Default Re: merging databases - almost perfect solution - 09-21-2005 , 09:08 PM



I'm afraid I'm out of ideas on the scenario you describe.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.