Jump to content

Imagewin for pictures

This topic is 861 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have always developed with FileMaker for windows. I have bought myself a MacBook Air and love it. So now I am using FileMaker 16 Pro advance for MAC. I know that MAC does not label their directories like windows does. So I am having problems figuring out to get the right coding to access my photos. I have a folder called "Photos" that reside on the C: drive in windows. Then I reference that folder so pictures will populate automatically when I put in a record. Here is what I have on the windows fileMaker:



// Transform the contents of a container field named Images to text
ImageRef = GetAsText ( ImagePath); Photos = Position ( ImageRef; "/"; 1;
PatternCount (  ImageRef; "/"))

Middle ( ImageRef; Photos + 1;
Length ( ImageRef ) - Photos )


"imagewin:/C:/Photos/" & Film::title & ".jpg"

Then I go into Import folder and point to the folder all the photos are in. The problem I have now is how to point to that folder in "imagewin", is their an alternative called imagemac, then I could put in Macintosh HD/Users/patricks/Documents.  The folder is in the Document folder, called Photos. Thank you for any help.

Link to comment
Share on other sites

I don't really understand your question. If you have a folder named Photos in your Documents folder, then the path to it can be calculated using the Get (DocumentsPath) function.

For example, if the title of your image is stored in the Film::title field, then the path to the image could be calculated as =

"imagemac:" & Get (DocumentsPath) & "Photos/" &  Film::title & ".jpg"
Edited by comment
Link to comment
Share on other sites

  • 1 month later...

I am sorry that it took so long to answer. I had thought I sent a thank you, but does not look like it, sorry. I am still not getting the this to work. Should I be changing something in the ImagePath calculation? I have the Photo folder in the document directory. Thank you. 

Link to comment
Share on other sites

I am afraid I still don't understand what you're asking. Do you have a field that contains the image's file name? When you import a folder, you get the option to map the file name into a text field - so you shouldn't have to extract it from the container field. 

If you do extract it, then AFAICS your method will extract the file name including the extension - so you shouldn't be appending the ".jpg" part at the end. 

You should test the results you get at every step and see if they make sense. Also try my suggestion with a known file name.

Note that the ImagePath calculation you posted references a container (?) field named ImagePath; that too is confusing.

Link to comment
Share on other sites

For this kind of cross-platform problems I always use global variables setting script to change the paths with platform change which I think is easier rather than using complex calculations , set default globals with respective device id script and enjoy fm flow :) , since 9 yrs i never used global variables when i understood what are they my solution took Uturn IN UX/UI DESIGN hope u got my point try to use globals for ur paths :)

Edited by Dr.Gopala krishnam raju AMBATI
Link to comment
Share on other sites

  • 1 month later...

Instead of enter the path in the auto-enter calculation of the container, it needs to go in the Options > Storage (look to the bottom of that Storage tab). 

I think I misinterpreted your question.  Sorry. And no way to delete my own post. 😱

Edited by LaRetta
Link to comment
Share on other sites

If you define the field as auto-entered calculation, it will not update when you open the file on another computer. It needs to be an unstored calculation field. 


40 minutes ago, LaRetta said:

Options > Storage (look to the bottom of that Storage tab). 

That's an interesting alternative. But then I think the container field must store the image name and extension?

Link to comment
Share on other sites

Still not sure why it is not working. I can get it to work on Windows 10. But I am trying to stay with my MAC, since I really like it. So I should not be putting the 

"imagemac:" & Get (DocumentsPath) & "Photos/" &  Film::title & ".jpg"

in the Auto enter calculation? So how do I run it? I have 715 pictures right now so I would really like to be able to get them to auto fill. I already have the database built with all the information of each film, just need the container to fill the image that is related to that particular movie. The posters are stored in a directory called "Photos" in the Documents folder. Each movie poster is titled with a .jpg extension. Thank you. 

Link to comment
Share on other sites

This topic is 861 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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By HOnza
      Everyone is excited about Lion. Even though many new features on Mac OS X 10.7 are giving us improvements we kept asking for since 10.1, Apple has again succeeded in giving all the new features the strong essence of innovation that makes us unable to hesitate to install and try Lion out as soon as we are able to.
      But we are also afraid. What if some important apps stop working?
      Read more in my article. Alredy updated with links to other resources and opinions...
    • By Mafia2020
      I know the solution is probably very easy but it escapes me. I got this database, which I use to create invoices, year after year, I created a report page where with a neat summary field I get the "lifetime revenues", "lifetime general expenses", "lifetime total taxes" and "lifetime total invoices number", which is handy, but I need to have the same data broken down by year, and I can't figure out how to achieve that.
      In another post I have been suggested to consolidate the three tables I had (Invoices 2018, Invoices 2019 and Invoices 2020) into a single table (Invoices) and then use a "subsummary" which would give me the data I want based on how I sort the records but I am not sure how to use subsummaries nor I am sure I want something where I have to multiple click to re-order records to get data one at a time; I'd rather prefer a report where a calculation of some sort would make a sum of the total revenue of my invoice records broken down by year, as I exemplified in the database I'm attaching, is that possible in an easy, possibly not involving complicated subsummaries way?
      I'm beginning to get desperate on the subject, please have mercy.
      Invoices Demo.fmp12
    • By charlitoA
      Hey Everyone
      We are having this issue with the change of any of this variables
      IOS 13
      FileMaker 18
      FileMaker Server 18
      FileMaker Go 18
      We have a Layout for FileMaker go to upload photos from an iPod Touch or iPhone Pro 11, and when we use a script to take the photo directly from the camera works perfectly, but when we use the another one that has to open the library from the device it will happen either of this 2 things
      1. It will duplicate on the mini preview the last "good" picture and when try to maximize the picture nothing shows up
      2. It will happen this weird "no signal tv" ( that's how I call this lol ) image and there's no way to see the picture
      On MacOS the pictures looks great, also con iOS , it seems that windows it's not detecting as a valid file when the photo is taken from the library of the iPhone or the iPod Touch (this never happen in older versions of filemaker or iOS)
      Any ideas ?

    • By Teilo
      So, the time has come. Runtime support is gone in 19.
      This puts me in a quandary. At my company, I have a handful of small apps that do nothing but import CSVs and print labels with barcodes on Zebra label printers, or packing slips with pictures for each item. These are one-off special purpose databases. There is no active data management. The scripts clear out the DB and import a fresh CSV on each run.
      I have tried making these applications work with Server, to no avail. I doubt anything has changed in 19.
      I can understand Claris wanting to move to an online subscription-based model, but the problem is that the server version is not at feature parity with the desktop client for certain essential things I need, like printing to a label printer, or exporting PDFs with images that come from a folder full of PNG files that change on each run.
      I have some time, obviously, but version 18 will not run forever, especially if Apple's shenanigans continue. Is Claris listening, or should I just assume that this is a lost cause?
    • By Dimitrios Fkiaras
      I have a simple leaflet.js map which is working completely offline. All the references in the HTML5 code are absolute and refer to local files.(javascript, css, tiles).
      I noticed - and was really surprised - that I was able to copy the HTML5 code into a global field and run it a web viewer (FM 18, Windows 10, Chrome browser).
      (Up to now, I thought that all external references should be included in an HTML calculation.)
      When I tested the same file on my Mac (and changed of course all the paths to the new paths on the mac) I couldn't get it to work. It seems that MacOS isn't able to do so.
      (Mac OS 10.14 Mojave, Safari). Is this true?
      any help is much appreciated,
  • Create New...

Important Information

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