Jump to content

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

Recommended Posts

Posted

Hi there,

I could need your help with this...

I have a single file FM6 Database which I use for keeping track of my cacti, seeds and seedlings each one with different layouts and fieldnames to keep them apart. The problem I encountered is the following:

I would like to be able to export/copy several fields from the seedling layout to a newly created layout in the cacti database. Prerferably I'd like to have a button with a script to do this job for me.

confused.gif

Dirk

Posted

Hi Dirk,

What you are wanting to do is Import these records into your new database. FileMaker uses the "Found Set" when importing or exporting.

Step one then is to isolate those records that have the information you want to bring into the new database. To do this, perform a find in your exiting database in the import winow and open it, then to isolate (a Found Set) of those records, which can be one to all records in the database.

Step two is to go to your new database and perform an import. This requires you to first find the original database, then align, or select the fields to imported, click Okay.

HTH

Lee

smile.gif

Posted

Lee,

The way Dirk formulated his querry could lead to several interpretations of what exacltly his need are. Mine is different from yours.

What could be the point of exporting/importing records from the Seedings.db into the Cactus.db ?

I have the feeling what Dirk is looking for is to relate the Seedings.db to the Cactus.db, so that he can identify which seeding is used for each type. Or simply to use related fields from the Seedings if this relationship is already established.

Now, the ball is in Dirk Camp ! What's the file structure ?

Posted

Hi Lee,

I'm not quite sure if I described my problem right, on the other hand the function you describe here needs another/seperate file for importing data. thats not what I would like to do. Ok, another try smile.gif

As I wrote before the whole Database consists of one single file, having different layouts which I fill in using the browse mode. From time to time I need to make a new dataset in the cacti section of this db using 5 fields from my seedling part. The fieldnames are different.

When klicking on my "export-button" in the seedlings layout thats what should happen:

- go to the cati page

- create an new dataset

- copy these 5 fields from the seedling recordset to appropriate fields in the newly created cacti set... thats it wink.gif

The main idea behind this is to save me time retyping fielddata which is already present.

I tried using variables to store the fielddata in and various other things... didn't work frown.gif

Posted

OK,

So what I thought was a Single User Db was in fact a single FM File...

Hmm...

There's no export at all here as you seem to be transfering data from one field from an old record to a new one. You could define your set of fields as a set of global fields and then have a script ???

Set Field (g_field1, field1)

Set Field (g_field2, field2)

...

Set Field (g_field5, field1)

New Record

Set Field (field6, g_field1)

Set Field (field7, g_field2)

Set Field (field8, g_field3)

Set Field (field9, g_field4)

Set Field (field10, g_field5)

Go to Layout X

There's no dependancy on the Layout except if you're using the Copy/Paste or Insert Calculated script steps.

I'm not that confident though this script would solve all problems here. You should really look at a way to store each data into separate file and use FM Relationships Capabilities.

Now I let other users comment on your structural choices...

Posted

Hi all,

... it worked!!

After 1 hour trying it finally worked out. Further on I tried taking my db apart into serveral datafiles to use relationships but I ran into even more probs there.

Thanks to all!!

Dirk

Posted

Glad it worked Dirk....

Though, splitting your db in different files should be the thing to do before your business or db solution really evolve, leading you to 1,000 other problems to solve, from which the major ones would be the excessive repetitions.

As you may have undestood, separating the datas into each file and using FM relationships would help you save these ugly script steps.

If you need more help on this, you'd get all the help you need by simply asking.

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