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

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

Recommended Posts

Posted

Hello,

 

I am using FM12 and one of the new features is being able to drag-and-drop images onto container fields. My question is how am I able to script when someone drags an image onto the container so as to run some backgrounds operations? Another issue, is that the default storage for drag-and-drop is to include the image in the database, rather than a reference (which I prefer to do in the solution I am working on). Thoughts on how to use drag-and-drop with scripts?

 

Thanks,

 

Stephen

Posted

Thanks for your reply. One more question.. How can I get the actual full path to the dragged file from the container? The GetAsText(container::name) only gives me the name since a dragged image is actually stored in the file and not referenced. When I import a referenced file, I get the full path using the GetAsText method. But since I can't change the drag-n-drop method from insert the actual item into the file versus storing the reference, I am unable to get the actual path. Any thoughts here? The only thing I can think of is a work around where I export the contents from the container to the temporary folder and then import the the file from there using the other commands of insert file where I have more control.

 

Regards,


Stephen

Posted

I solved this issue by creating a script trigger to take the dragged contents and exporting it to a temp location, then reimporting it into the same field using the reference options that I can script. It is working just fine. Wish there was a way to "capture" if the user dragged a file into a container field.

Posted

Matt Petrowsky recently posted a technique for doing exactly this although he's storing the file in Filemaker itself and not a reference.  I don't know if you can even display an actual thumbnail for referenced files in FM12.  It might be better to use a remote container field and an unsecured store location, that way you can specify exactly where the file will be without increasing the size of the database file itself.

 

Here's the technique in question - http://www.filemakermagazine.com/videos/drag-drop-portal-images.html

 

I'm curious as to why you're only storing a reference to the file and not already using remote container fields?  Unless you're using a fileserver and a network store (which is perfectly reasonable) there are significant disadvantages to using references and not taking advantage of remote container fields in FM12.

Posted
Matt Petrowsky recently posted a technique for doing exactly this although he's storing the file in Filemaker itself and not a reference.  I don't know if you can even display an actual thumbnail for referenced files in FM12.  It might be better to use a remote container field and an unsecured store location, that way you can specify exactly where the file will be without increasing the size of the database file itself.

 

Here's the technique in question - http://www.filemakermagazine.com/videos/drag-drop-portal-images.html

 

I'm curious as to why you're only storing a reference to the file and not already using remote container fields?  Unless you're using a fileserver and a network store (which is perfectly reasonable) there are significant disadvantages to using references and not taking advantage of remote container fields in FM12.

 

Yes, I am trying to migrate my solution to the remote container fields. I am in the process of updating my users from FM11 to FM12. Once the initial update is made, I'll make some changes to the container fields as well. I usually go over the articles at Matt's site (I have a subscription) but I may have missed that one. Thanks for the input!

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