Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto inserting an image

Featured Replies

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

Are the pictures named any combination of fist and last name?

  • Author

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.

I do not believe you can do this in FM 6.

  • Author

OK.

How would I go about doing it though?

I would still like to try

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.

  • Author

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. ;)

  • Author

Ask and ye shall receive!

IT installed the plug-in for me...

I'm going to give it a try right now...

  • Author

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

You will have to put the directory field on a layout, enter Browse Mode, then type the path name in the field.

  • Author

can i make this field hidden and locked so it will always have the same pathname in it?

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.

  • Author

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...

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

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 by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.