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

Featured Replies

I would like to import pictures or/and check if they exist by using a calculation.

I know the name of the picture and the path but insert picture function does not work as i would like to.

For example, i have a file which contains information about "apple" and the picturefile is "apple.jpg" which resides in "apples" folder, then we have "lemon" etc. Is there a way to write a script which imports apple.jpg from apples folder and lemon.jpg from lemons folder etc?

I know, i can write an applescript for checking if picture file exists and write the result into FMP field but don't want to if there is a way using only FileMaker.

Thanks

Check out the Import, Folder dialog. It's the same as any other Import dialog, which means it has the Update Matching Records option, where you click on the "key" to match with (turning it into <=>).

If you had a calculated key in FileMaker to match the Filepath (one of the fixed fields to import pictures or files), then you should be able to do what you want.

There is an "Include enclosed folders" checkbox at the 1st level of the dialog, which you'd want to leave on.

Your entire folder structure must be in a known location, relative to the database, hopefully within its folder. Then you can use the Get(Filepath) function to get your current location, and parse and add to get the filepath to the file.

If your current folder is field "myFolder", the calculation would look (something) like:

myFolder & folderName & "/" & filename

Actually, there's more. A "gotcha," to do with this silly "file:/" business. Get(Filepath) returns "file:/" now (7.0v2). But the darn Import Folder still expects "file://"! I wonder if this will be changed down the road? For now though:

Substitute (

Left ( Get(FilePath);

Position (

Get ( FilePath ) ; "/" ; 1 ;

PatternCount( Get ( FilePath ); "/" )

) );

"file:/"; "file://")

&

"images/" & PictureName

This seems to work for matching records. I just wrote "images/", but you'd use a field with the folder name. So the above is not entirely tested, but I think it'll work.

If you are wanting to write a calculation based on values in a field to determine the path of the image ( I think that is what you mean ) You have to use the Troi plug in there are some extended functions that enable you to do this. Also you can log the error code in a field during the import, then this will tell you wether or not the image was found.

You can define a calculation field call "Image_Path" , a "folder" field, "image_name" field:

russell up something like this:

"file://osx/users/....../"&folder&"/"&image_name

I have use this for that exact reason and work a treat

You can get a demo which lasts 45 mins. from http://www.troi.com

There are examples included, you can tinker with these to acheive what you want.

hope this helps,

eric

  • Author

Thanks Fenton,

think this could do the trick.

Create an account or sign in to comment

Important Information

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

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.