Viddar Posted July 18, 2005 Posted July 18, 2005 Is there a way I can make FM look for a picture in a certain folder then have the picture automatically get inserted in the proper field when I enter a name in another field? For example: I have three fields, First name, Last name & Picture. When I enter a name in both name fields I want FM to search a certain folder for a picture with that name and place it in the Picture field... Basically: first name + last name = image
Wim Decorte Posted July 19, 2005 Posted July 19, 2005 Are the pictures named any combination of fist and last name?
Viddar Posted July 19, 2005 Author Posted July 19, 2005 yup... the pics all have a file name of firstname lastname.jpg I know that not every picture can be auto-inseted due to the image file being misspelled but this will certainly help me out alot.
Viddar Posted July 19, 2005 Author Posted July 19, 2005 OK. How would I go about doing it though? I would still like to try
Mixtli Posted July 20, 2005 Posted July 20, 2005 I don't know if you can grab the image automatically, but I just installed a shareware plugin called shell from www.abstrakt.com Once you have installed the plugin you can create three fields imagename (Calc)= firstname & lastname & ".jpg" directory (GlobalText) = Type in the full path you would like to search. For example: c:images result (GlobalText) On the third field do a Set Field through Scriptmaker result = External("shell-Execute"; "dir " & directory & imagename) This is similar to open a windows shell go to the directory where you have your images and typing the dir command. The difference is that the plugin gives you back live text in your global field where you can manipulate with text funtions perform a search and check if your image is or is not there.
Viddar Posted July 20, 2005 Author Posted July 20, 2005 Due to the fact that I'm at work and IT has tons of restrictions put on our computers and, more importantly, don't have WinZip on this machine, I need a favor. come someone extract and post the Shell plug-in here so I can try it out. I would appreciate it very much. ;)
Viddar Posted July 20, 2005 Author Posted July 20, 2005 Ask and ye shall receive! IT installed the plug-in for me... I'm going to give it a try right now...
Viddar Posted July 20, 2005 Author Posted July 20, 2005 imagename (Calc)= firstname & lastname & ".jpg" directory (GlobalText) = Type in the full path you would like to search. For example: c:images result (GlobalText) On the third field do a Set Field through Scriptmaker result = External("shell-Execute"; "dir " & directory & imagename) I'm having trouble setting up these field definitions. the first one I think I have got correct. When I try and make the second one It won't let me put a path name in. It will only let me choose a data type... Can you hold my hand with this? I'm running FM 5.5
-Queue- Posted July 20, 2005 Posted July 20, 2005 You will have to put the directory field on a layout, enter Browse Mode, then type the path name in the field.
Viddar Posted July 20, 2005 Author Posted July 20, 2005 can i make this field hidden and locked so it will always have the same pathname in it?
-Queue- Posted July 20, 2005 Posted July 20, 2005 Remove it from the layout and no one will ever be able to modify it. Make sure you do not set its value while FM Server or another user is hosting the file, though, or the global value will not be retained when you close and re-open the file. Another option for 5 would be to use a calculated (or auto-entered) field with the path name as its resultant value, which would not have the global's problem of retaining the value in a multi-user or Server environment.
Viddar Posted July 20, 2005 Author Posted July 20, 2005 Oh well... That's grabbing the filename of the image but it's not putting the image in the field. Can FM7 do what I'm trying to do? I'll see if I can't convince my boss to buy it for me...
Slickwilly9 Posted July 23, 2005 Posted July 23, 2005 I am interested in the samething. I have FM7 and want to know if that is possible at all? Has anyone been able to do it? Thanks
Fenton Posted July 23, 2005 Posted July 23, 2005 (edited) FileMaker 7 can automatically show an image by creating a calculation of the image file's path.* The image should be on another mounted volume for each client on a network to see it (as the volume must be shared, and that's not recommended for the FileMaker database files). FileMaker 7 also has a huge file size limit, more than you'll ever need. So you can just embed the pictures in a FileMaker table (perhaps a separate file). It depends partly on how much interaction with the image files you need as to which method to use. 7 is way ahead of 6 on all counts. There are several possibilities. *You use a special prefix, like "image:" & the complete file path. It is a little different for a Mac or Windows. Look at the image file reference paths in the appropriate FileMaker script steps to see what to use. Unfortunately none of this is in the FileMaker Help. There are several posts here in FM Forums. [More] I'll also add that, because the path is a calculation, you can use separate fields for parts of it, the volume name in one field (probably a global), perhaps part of the folder path also; then the rest of the folder path a related text field, say an abbreviation of the client's name, then the file name unique to that image. Obviously your folder structure should be well-organized to use the calculation method. You can also "blend" the older Import Folder of image files command with the calculation method. Import a folder of images, but only import the File Path and File Name fields, ie., no actual images. Use the File Path with the appropriate (platform-dependent) "image:" prefix to show the images. You can use the "matching" option, using the file name (if unique) or file path, with "add new records" to synchronize your database with a system of folders. [One last trick -] The Troi File plug-in can dynamically show you, in an unstored calculation field, if an image is missing. AppleScript can also tell you this, but requires a script to check. Edited July 23, 2005 by Guest
Recommended Posts
This topic is 7065 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 accountSign in
Already have an account? Sign in here.
Sign In Now