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

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

Recommended Posts

Posted

I wrote a script to [color:blue]import up to 100 files in one go. If someone is interested I will post it. It is probably a bit primitive but it works fine.

I was surprised filemaker can't do that by itself, but maybe I'm mistaken.

Posted

I also wrote one I am a bit proud of. It is as extensible as possible with FileMaker. See attached and please post yours.

The concept is such:

Put your currentData file(s) in the currentData folder and your newUI file(s) in the newUI folder.

Add 2 external data sources for each file (one currentData and one newUI).

Then, add 2 table occurrences for each file. The attribute delimiter is modifiable in the master deployment script. I used two underscores "__" in the example but you can use anything that doesn't exist in your file name. Each table occurrence should be named with this nomenclature: fileName & attributeDelimiter & either currentData or newUI. Draw a relationship between the currentData and newUI table occurrence that doesn't need to make sense. This is just so you can call the GetNextSerialValue function.

Then, add one layout for each table occurrence with the exact same name as the table occurrence.

Then, open up the __Import script and add a line for each basetable. Use the file as a guide.

Then, open up the __SetNextSerialValue script and add a line for each auto-enter serial number. Use the file as a guide.

Run the Deployment script and it should stop if there are errors. There is a lot of error catching although it is possible in theory to import things into the wrong table if, for example, you have the wrong data source on a table occurrence.

I know this seems like a lot of work so here is my justification. This makes it possible to pull the data out of your most recent backup or your un-hosted live version and push it into a developed version without adding external data sources to your working copy. Pretty magical and awesome if you don't like to develop and test outside your production file.

If anyone decides to give it a go, post on here if you have difficulty. I have subscribed to this post.

Deployment.fp7.zip

Posted (edited)

I looked at your scripts and it is certainly quiet impressive. So impressive I'm a bit shy about my solution.

[color:black]Problem Description

All teachers in the school of my wife have to fill in a form, several times. I've made the form in Excel. The data goes to a separate worksheet. The teachers mail their forms.

The filemaker database must now import that worksheet from all those workbooks.

I used the "import records" scriptstep, and copy/pasted until I had 100.

I then worked with [color:blue]Clip Manager, to 'find & change' the names of the workbooks in the script.

------

The excels must be in a folder with the same name as used in the scriptstep.

The names of the excels must be set to [color:green]workbook1.xls ; [color:green]workbook2.xls etc. I do that with automator in Mac, or rename utility (free) in Windows.

With one click, and in a split sec the database imports 0 to 100 excels sheets.

He, I see you worked for Tintin. He's from Brussels too.

Edited by Guest
  • 5 weeks later...
Posted

I'm running into this very problem. I need to import a bunch of differently named excel files processing each one separately. Would you post your solution for Window please?

Thank you in advance

Posted (edited)

In order to help you with the shortest solution I need to know the following:

[color:blue]How many excels do you need to import approx. ?

Is this an operation that will happen again ? Meaning, is it a one time import of multiple files ? Or will you have to do that many times again in the future ?

Does every file needs to be imported the same way ?

Are there different sheets in the excel doc, and if so, what is the name, of the sheet that needs to be imported ?

Do the fields in the excel have names corresponding to fields in your Filemaker doc ?

I think I will be able to help you, but we must be absolutely clear on what needs to be done.

Bye

[color:brown]I haven't had a reply so far…

Edited by Guest

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