Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating script to populated empty containers with images

Posted on 2006-11-28
5
Medium Priority
?
249 Views
Last Modified: 2010-07-27
If I had a field called IMAGEPATH, is there a way to create a script that will use the field as the actual image path to insert an image from my hard drive in an empty container in the same record?

What I am hoping to do is have the script check for empty containers throughout my database, and fill them with images on my hard drive using the imagepath field to guide it to the appropriate image for that container.
0
Comment
Question by:jarrodprice
  • 3
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
lesouef earned 2000 total points
ID: 18036717
the trick is to declare a variable $imagename = the field which contains the image path, and use this variable as the file reference for the insert file or picture command (you type the variable name in the window where you normally insert a real path for the file to import.)
to insert a file, use a filemaker path (must be specified as filemaker file references, not as the OS path, that is:
file:/C:/Documents and Settings/Utilisateur/Mes documents/ttt/smorsche.jpg for a file or
image:/C:/Documents and Settings/Utilisateur/Mes documents/ttt/smorsche.jpg for a picture
relative paths are also ok:
image:./ttt/smorsche.jpg

so if the paths you have are not formatted like this, you need to work the rigth syntax out of yr existing paths first. but this is normally a bit of subsitute steps when creating the variables; let me know if you need help for this too.
0
 

Author Comment

by:jarrodprice
ID: 18037045
I am confused.  If my image path was "C:/Documents and Settings/Utilisateur/Mes documents/ttt/smorsche.jpg", and that was the content of my imagename field, how would I right the script to start at the first record, and for each record with an empty container, insert an image in the container using the path from the imagename field for that record.  How should I write the variable in the script? what should the syntax be for the image path?  In the "insert image" command, how do I write the path?
0
 

Author Comment

by:jarrodprice
ID: 18037316
disregard...I got it.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 18037354
if you say so... otherwise I am back behind my keyboard...
0
 

Author Comment

by:jarrodprice
ID: 18037422
No it is working perfectly.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question