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

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

Recommended Posts

Posted

Hello everybody, if this post is not in the proper category, please let me know.

I have a customer database that is also being used for trouble tickets (all of that works fine, thanks to the help I received here for a function or two... or four). I would like to add a function that would allow employees to add attachments to the customer's file (emails, images, docs etc...). Now, I added a container for the attachments plus a button "insert attachment" that performs a scipt (a one liner, insert file in container "attachments" and made sure that the "store a reference only" was unchecked. It works well... for one file only. I would like to be able to keep multiple files in the container.

Now I've heard about "Supercontainer" by 360works. Is a 3rd party plugin absolutely necessary or is there a workaround?

Thanks for the help.

Posted

One file per container is how it works.

You should create a separate related table for the attachments; you could then add as many as you like for each customer/ticket, one record for each attached file.

SuperContainer is very nice, but you'd still set it up the same way, using a related table with one record per file.

Posted

:

Yay! It seems to work perfectly. I just wish that the files could be opened just by double clicking instead of left click --> export field contents to then open the file from the saved location. But it's all good!

Thank you Fitch!

Posted

Hello comment,

Hummm... Well, I have to admit that this would be a great feature. But there is one tiny little bit of a problem. I have absolutely no idea on how to proceed. Could you please enlighten me?

Thanks.

Posted

Right click the field --> Button Setup --> Perform Script.

You can use the Open URL script step referencing your container field.

Posted

Well, we meet again mr_vodka. Always a pleasure chatting with you.

It works perfectly except for one thing, the files do open properly if I click on them in the portal I created for the attachments, but I cannot seem to be able to add files anymore. I'll just attempt to create a button that will add a reccord to the table containing the files. I'll keep you posted.

Thanks!

Posted (edited)

All is now ok. I added a button with a script to add the files to the proper table.

Thank you for the help everybody!

edit: This whole related fields/portals made me think. Could (in theory of course) a similar way of doing things could allow me to add multiple attachment files to an email send via FMP?

Edited by Guest
Hummm, maybe this could work
Posted

FileMaker's Send Mail script step allows only one attachment.

Posted

There are email plug-ins which can do this. Another possibility would be to zip the multiple attachment files, so they are one file. There is a free plug-in for Windows, MooPlug, which can do this. But that is a little more work than an email plug-in, which can do multiple attachments, inline images, as well as HTML email, if that's what you want.

On a Mac you can do multiple attachments or zipped attachments via AppleScript and Mail (or Entourage), though it is also some work. That doesn't help you, but I wanted to mention it, in case some readers are on Macs.

Posted

Thank you for the information Fenton,

Unfortunately, no users of the database are runnning on Mac OS, perhaps that someday in the future the situation will be different, but for now, eveybody is running M$ Windows.

Now, I am known to be slightly stubborn (more than slightly at times). When I started this database, I took the decision not to use any plugins. This limits me in some ways, but on the other hand, it allowed me to learn quite a bit about FMP in general and even more about script steps. Using no plugins also allows me to move the database to another FMP server/client without having to install plugins in case of hardware problems. Not to mention that the only license I have to worry about is the license for FMP and none other. Yay! :

For now, sending only one attachment in my newsletters is not a show stopper. But after using related tables and portals for my "multiple attachment" problem, I tought I may be possible to use a similar procedure to send multiple attachments in emails. Perhaps the FMP team will add the multiple attachment function in the next release. For the time being, if I need to send multiple files, I'll simply zip them or, in the case of text documents, I'll combine them into a single PDF document.

Once again, I have to thank everybody for the information. This is probably the most helpfull forum I ever had pleasure to post in (all subjects confounded). Everybody has been polite, helpfull and even though my questions were... how could I say... at a beginner's lever (like the post above about the field to a button... really simple after all) there was always somebody to answer my question in a polite manner without telling me to RTFM.

Keep it up guys. As soons as I see a question I can answer with certitude, I'll live up to you example.

Posted

There seems to be a bit of an issue with the buttons on a portal. To clarify things, I'll resume the setup.

Table [color:red]main

Contains the client's record

Table [color:red]attachements

Contains the attachments

Layout [color:green]main

Contains the customer's info (name, address, email, ID etc. from the [color:red]main table)

Layout [color:green]notes

Contains the notes in the customer's file that are in the [color:red]main table

Layout [color:green]attachments contains the fields from the table [color:red]attachments

The fields I use for the attachments are:

[color:blue]main::ID

Contains the unique ID number of the client (number)

[color:blue]attchments::ID

Related to [color:blue]main::ID

[color:blue]attachments::attachments

Is a container

In the layout [color:green]notes, I have a portal that displays the reccords in [color:blue]attachments::attachments

Now, if I keep all of this as is, it seems to work well. To facilitate the usage of this database, I want to be able to do the following.

1. Add a button to add an attachment

2. Be able to view the attachment without saving it locally

So, I added a button that performs the following script to add an attachment:


Go to Layout [ “main” (main) ]

Copy [ main::ID ]

[ Select ]

Go to Layout [ “attachements” (attachements) ]

New Record/Request

Go to Field [ attachements::ID ]

Paste [ ]

[ Select ]

Insert File [ attachements::files ]

Go to Layout [ “Notes” (main) ]





This works



To open the attachment, I added a button the the portal (on the ::attachment) part that performs the following script:





Go to Related Record [ From table: “attachements”; Using layout: “attachements” (attachements) ]

[ Show only related records ]

Open URL [ attachements::files ]

If I click to add an attachment, it works.

If I click on the attachment to open it in the portal that works.

In conclusion, everything works fine if I add the attachment and then view it immediately. But, if I close my FMP client, then open it again. I cannot view the files. I tried to remove the "perform without dialog" on the OpenURL part to see the name of the file in the dialog box.

The name is ok. I tried to remove all the steps except the "go to related record" to see if it did indeed go to the proper reccord and it does.

Any ideas why this happens?

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