AnsweredAssumed Answered

How to insert multiple files with a button - calculation help needed

Question asked by southernkross on Oct 20, 2016
Latest reply on Oct 30, 2016 by BruceRobertson

Hi guys. I’m a Filemaker newbie and I need so help with a calculation. Forgive me if this is a stupid question.

 

I want to be able to attach multiple documents (excel, PDF etc) to my database through use of a button and display them in thumbnail form in container(s).  I want others to be able to click on these documents and open them with the corresponding program.

 

I have made a button called “attach file” and it has the following script:

 

Insert File [Filters; Reference; Never Compress; Content Management:: attached documents1]

 

“attached documents1” being the container that I wish to display the thumbnail.

 

That all works fine, but what I would like is to insert up to 3 files. Because it seems there isn’t a way to display more than one file in a container(?), I have created additional containers named “attached documents2” and “attached documents3”.  I realise now I need add in a conditional calculation to attach a second document. The idea being if “attached documents1” already contains a file, then that second file will be inserted into “attached documents2” (and so on).

 

This is as far as I’ve gotten:

 

Case ( not IsEmpty ( Content Management::Attached documents1 );  )

 

How can I complete this calculation or is there a better way to do this?  Any other advice is welcome.

 

 

Just as a note: I’ve been dropped in the deep end and have had to basically figure out FM completely on my own without any instruction or a proper tutorial (I’ve actually lurked in this forum a lot for help figuring things out, so thanks for that!). I know very little about calculations beyond the bare basics, so feel free to talk to me like I’m an idiot when you explain this stuff - I won't be offended.

Outcomes