Jump to content
Sign in to follow this  
TimonF

export certain fields to excel sheet

Recommended Posts

Hi Guys,

I'm working at a fairly easy database that will be delivered as a runtime solution. It's only purpose is to export the users input in an excel sheet - after some checking. I'm working with 3 tables: Globals, Orders and Positions (not exactly but it's the same principle). Now I need to export one Order to one xls. The xls contains certain fields from all 3 tables and each position (of the users order) would be one row in the xls.

Using the export to excel script step i'm only able to export all fields of the specified table. So i created an Export table that has all the fields needed in the xls. But every attempt to write a working script that put all the fields together in the Export table failed. I tried using relations (for which i had to add a foreign key in the Export table that showed up in the xls of course), variables (tried to use am as search criteria, didn't work either) etc...

Now i'm stuck with this darn solution that should've been so easy to create.

Has anybody a clue what i'm doing wrong, any examples, work-arounds?

Share this post


Link to post
Share on other sites

As far as I read your explanation you have successfully extracted the necessary fields into the export table, albeit with the unwanted overhead of the foreign key...

Extend the concept to a further export table, which will perform a conventional import from the original export table, but exclude the foreign key from the field map. Then use this secondary export table to do the excel export.

I worked up a quick example, see attached.

Untitled.fp7.zip

Share this post


Link to post
Share on other sites

Thanks a lot. I have to admit i wasn't clear in my first post. Actually i thought i'd eventually come up with a way to get my data in the (first) export table but i'm still stuck. As for your example that'd be the second step. Thanks for the example by the way, i would never have thought of that.

Back to the first step: I 'only' need a script that selects/gives me a foundset of all positions belonging to the order, i.e. with the same foreign key as the orders' primary key. The script is triggered when the user clicks an export button in the order list (from the specific order row).

I'm pretty sure i did it once. But i can't remember the script step or how to do it. It should be quite simple that's all i know...

Share this post


Link to post
Share on other sites

I did it. Created a script that does it all. Doesn't look nice, but hey, developing with FileMaker you gotta get used to it.

Thanks again for the help.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.