Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Insert Picture Script Step


ChrisDunnington
 Share

Recommended Posts

Hi

 

I have a huge amount of photographs that I would like to be able to search on by keyword.

 

I have set up a basic db with the following fields:

 

Thumbnail : Container; the thumbnail image imported from the specified directory

Path ; text ; the pathname to the file

FileName ; text ; The name of the actual image

Photo ; container ; the actual photo itself

Keywords ; text ; keywords associated with that photo

 

The idea is that I want to import all pics from 1 directory and all of its subdirectories. No problem here, works fine importing the thumbnail, file path and file name.

 

I then want to search on the keywords to narrow down the viewed thumbnails. So maybe I end up with a found set of 15 records (pics)

 

Then, if I click on the thumbnail, I would like to 'Insert Picture' to the Photo field. The idea being to keep the size of the db to a minimum by viewing the thumbnail all of the time and only viewing the actual photo if it is selected.

 

The imported file path looks like: http://file://G:/Data/Pics/filename.ext

 

I thought that the file:// referred to a network drive though??

 

When I try to use Insert Picture in a script though, FM does not find the photo file. I have changed the format of the path for the Insert Picture script step to be imagewin://G:/Data/Pics/filename.ext using a Variable but still won't work. Also tried using imagewin:/G:/.............. No good though.

 

I think that I have to use the 'full path' option in the Insert Picture step because I am using several drives to source the thumbnails from.

 

Can anyone put me right please on the correct usage of the Insert Picture step in a script?

 

TIA

ChrisD

Link to comment
Share on other sites

I was following you fine until here:

 

Then, if I click on the thumbnail, I would like to 'Insert Picture' to the Photo field. The idea being to keep the size of the db to a minimum by viewing the thumbnail all of the time and only viewing the actual photo if it is selected.

 

 

a) Why would you want to go to Insert Picture to the Photo field? It currently already has a picture inserted into it!!! You could insert the picture not as a reference replacing the reference that is currently stored therein, but that sure as hell will not "keep the size of the db to a minimum" because then you'd be storing the picture and not just a filepath reference to it, in FileMaker.

 

Can you please explain what you're trying to do / expecting to happen / think you need to do here, where you are attempting to insert a picture where you've already imported it as a reference?

 

 

b)

 

I thought that the file:// referred to a network drive though??

 

Nope. A file URL is completely valid for local files, network files, anywhere your operating system can see a file.

 

 

c)

 

I have changed the format of the path for the Insert Picture script step to be imagewin://G:/Data/Pics/filename.ext using a Variable but still won't work.

 

Use Set Field, not Insert Picture.

 

Set Field [YourTable::ContainerField; "imagewin://G:/Data/Pics/" & YourTable::File Name]

 

Your syntax for the file path looks fine though.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use