Jump to content

Insert multiple pictures from desktop folder


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

Recommended Posts

Hi, 👋

This question is about insert PIcture or scripting.

I need to insert images of office buildings to corresponding 'office' table.  The images are on the desktop.

What is the simplest way to upload many images to respective record. I have the customer number and/or image field.

option 1: create table / container field / customer number - upload images THEN create a relationship between the customer table and the image table 

option 2: write a script to upload it to the layout and image container field.

Any suggestions. Any tips. please instruct with step by step instructions if possible.

Thanks a million.

Link to comment
Share on other sites

I could not understand what exactly your question is - esp. this part:

1 hour ago, Sharifa said:

I have the customer number and/or image field.

You say that:

1 hour ago, Sharifa said:

The images are on the desktop.

If all the images you want to associate with a specific office are in the desktop folder, and there are no other picture/movie files in that folder, then the simplest way to do this would be to run a script that:

  • sets a variable to the parent office record's ID;
  • goes to a layout of the Imaages table;
  • imports picture and movie files from the desktop folder;
  • replaces the contents of the foreign key field with the value stored in the variable;
  • returns to the parent layout.

--
P.S. Please update your profile to reflect your version and OS so that we know what you can use.

 

Edited by comment
Link to comment
Share on other sites

This sounds good. Alas, I've never written a script. Is there a sample I could try out?  The variable part is the part I don't get yet.

The assignment is to attach an image per office. So far, I have created a table and layout and with this a field container for the image

 

Link to comment
Share on other sites

31 minutes ago, Sharifa said:

The assignment is to attach an image per office.

That's very different from what I thought. But you're still not telling us the whole story. If you want to automate this process, then there must be a way to tell which image belongs to which office. Ideally, the image name could be calculated from the existing data in the office record. Then you could calculate the path to the image file and insert it using the Insert File or Insert Picture script step, doing this in a loop for all office records.

 

Link to comment
Share on other sites

  • Newbies

Hi Sharifa,  I am presuming that you only need to this as a one off task, albeit for a number of images.  In which case I suggest the simplest solution is not to use a script, but use the File\Import Records\Folder... to import the images into a new table in your database, and then create a field in that table which you can use to create a relationship with you existing table.  You are just then left with the problem of how you populate the field so that it relates to one of your existing fields.  Worst case is you would have to type in the name of each office, but maybe there is some calculation you can perform to create the data from the image names.

Link to comment
Share on other sites

Yes, that's it, exactly. I did try it earlier; and the action added new records, rather than populating the  records already inputted. 

I am figuring out Filemaker with this exercise. The areas of complexity are calculations / relation  btw THANK YOU TO ALL WHO HAVE RESPONDED. Great community.

I have inserted it one by one.

CACULATE HOURS BUR RECORD - INSERT PICTURE.JPG

CACULATE HOURS BUR RECORD - INSERT PICTURE - with image.JPG

Link to comment
Share on other sites

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