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.

Container Calulation with different file extensions

Featured Replies

I've been using FM for few years but new to forums. So here we go!

I've got a container field in which i want reference to an image in the folder "Previews" (Same level as my FM solution). I can get this to work with this calculation

"image:Previews/" & JobNumberMonth & ".pdf"

In FM the field "JobNumberMonth" contains 4 digits "0206" relating to job number 6 of the 2nd month. In my "Previews" folder i have screenshots that are named "0206.pdf" etc that link to my FM solution.

What i want to do is be able to have files of different types in the "Previews" folder (.jpg .png etc)

I have tried taking the file extension off the reference file and out of the calculation. This does work (places the image in the container) but appears to run slower when scrolling through the records.

Also when you drag the image out of the container field to the desktop you can double click on the resulting "Picture clipping.pictClipping" file and it will open an image of equal size to the original. When you remove the file extension from the process this results in the "Picture clipping.pictClipping" file being blank on opening.

I have been trying to create a calculation based on something like

If .pdf not available use .png. If png not available use .jpg else ""

This is my challenge should you choose to accept. TIA

What happens if you calculate both references, separated by a carriage return?

  • Author

The simple things in life are often the best.

Comment, that worked a treat. Thanks for the help.

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.