Jump to content
Sign in to follow this  

Imagewin for pictures

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.

Share this post

Link to post
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

Share this post

Link to post
Share on other sites

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. 

Share this post

Link to post
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.

Share this post

Link to post
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

Share this post

Link to post
Share on other sites

Still not getting this to work. I uploaded a small example of the database. I have the pictures in a folder called Photos and it is in the Documents folder. I cannot seem to get it to show the pictures. Thank you for looking at it. 

ClassicMovies_DB upload.fmp12

Share this post

Link to post
Share on other sites
Posted (edited)

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

Share this post

Link to post
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?

Share this post

Link to post
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. 

Share this post

Link to post
Share on other sites

You should use the same formula - but the field type should be Calculation, not Container. Set the calculation result type to Container, and select 'Do not store ... ' in Storage Options.

Share this post

Link to post
Share on other sites

AMAZING, AMAZING, AMAZING. It worked, thank you for your help. LaRetta, thank you also. Both of you have a great day. Love this forum.  🙂

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Monarch
      Hi everyone!
      I have a text field, with each sentence separated by ¶ .
      I would like to create buttons for each line in this field, so that I can copy each line individually (and paste manually in different application for example)
      I assume that it's easy to do in calculation with GetValue, and make a script using Get (ScriptParameter) = line number in that field, for each button. ( I ll need only 7-10 lines max).
      1. I can't figure out what script function I need to use to make a selective copy...
      2. If one of the option is Set Selection function - how would it work in my case?
      Thank you!
    • By Richard Carlton
      FileMaker Coaches' Corner - Tip 11 - Improve Performance - FileMaker - FileMaker Experts
      Get up to speed with the FileMaker Pro 17 Video Training Course! 
      Top Rated Course by FileMaker Expert, Richard Carlton.  
      Experience Richard's dynamic and exciting teaching format, while learning both basic, intermediate, and advanced FileMaker development skills. With 27 years of FileMaker experience and a long time speaker at FileMaker's Developer Conference ,Richard will teach you all the ins and outs of building FileMaker Solutions.  The course is 50 hours of video content!
      Richard has been involved with the FileMaker platform since 1990 and has grown RCC into one of the largest top tier FileMaker consultancies worldwide. 
      Richard works closely with RCC's staff: a team of 28 FileMaker 
      developers and supporting web designers. He has offices in California, Nevada, and Texas.

      Richard has been a frequent speaker at the FileMaker Developers Conference on a variety of topics involving 
      FileMaker for Startups and Entrepreneurs, and client server integration.

      Richard is the Product Manager for FM Starting Point, the popular and most downloaded free FileMaker CRM Starter Solution.

      Richard won 2015 Excellence Award from FileMaker Inc (Apple Inc) for outstanding video and product creation, leading to business development.

      RCC and LearningFileMaker.com are headquartered in Santa Clara, CA.

      Please feel free to contact us at support@rcconsulting.com
      If you want to explore building I.O.S apps for I Phone or I Pad and deploying those out to the Apple App Store.
      Here is a video introduction to our iOS App Training https://www.youtube.com/watch?v=cVxQe_yAshw
      Looking for FM Starting Point free software download: http://www.fmstartingpoint.com
      For More Free FileMaker Videos Check out Http://www.filemakerfree.com
      Visit http://www.learningfilemaker.com for all facets of FileMaker Award Winning Video Training.
      Please Visit Our Channel: https://www.youtube.com/user/FileMakerVideos Please Subscribe While There.

      Please Comment, Like & Share All of Our Videos.

      Feel Free to Embed any of Our Videos on Your Blog or Website.
      Follow Us on Your Favorite Social Media

      Filemaker Pro 17 Training Videos
      FileMaker 17 Videos
      Filemaker Pro 17 Video Course
    • By Richard Fincher
      I'm just trying out FMS17 on a virgin Windows Server Essentials 2016 install, which I do not plan to use for any other task except hosting FMS17.
      I'm looking to switch off or block all ports and services which aren't needed for Filemaker Server.  The ones I'm planning to open for FMS are 80, 443, 5003, 16000.  The other ones which seem to be open separately from FMS are :
      53/tcp   open  domain
      88/tcp   open  kerberos-sec
      135/tcp  open  msrpc
      389/tcp  open  ldap
      445/tcp  open  microsoft-ds
      464/tcp  open  kpasswd5
      593/tcp  open  http-rpc-epmap
      636/tcp  open  ldapssl
      3268/tcp open  globalcatLDAP
      3269/tcp open  globalcatLDAPssl
      3389/tcp open  ms-wbt-server
      I'll be placing IP restrictions on 3389 (for my RDP), regarding switching off the rest, it occurred to me that parts of the OS may need to use some of these services to do what they need to do (e.g. allow administrator to login to windows?)  
      Will be using a firewall external to windows itself, rather than the Microsoft firewall.
    • By pandsmarine
      Hi guys,
      I’m brand new working with FM and would like your help with a calculation if I may. I want a calculation to display an estimated number of paint tins needed to paint a boat based on it’s length and width. With this information I would also like the cost of the estimated paint. I'm assuming IF can not be used as there are too many variables, can CASE?
      With the boats width, I've got anything over 7 classed as wide, so I've been using Jobs::BoatWidth > 7 to define narrow and wide (only two classes of widths).  I'm using the table below to give our customers a rough idea at the moment but would like information to be displayed in FM specific to boats length and width for each customer after entering that data: Jobs::BoatWidth and Jobs::BoatLength. Cost of each tin is £26.32. Hope I haven't left anything out and thanks in advance.

    • By H
      i have a table with 4  fields
      field 1 =  number result 1
      field 2 =number result 2
      field 3= percentage result
      field 4 = calculation by taking in whichever is lower field 1 or 2 and multiplying by field 3
      the question now is how do i script the calculation it should pick up which ever is lower but ignore if field is empty.
      i hope i am clear , i would appreciate if someone could help me out with this calculation. 
  • Who Viewed the Topic

  • Create New...

Important Information

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