Sign in to follow this  
Followers 0

Container Field label Lookup

5 posts in this topic


Can anyone please advise on my following issue.

I have a FM12 file with Container Fields that contain small jpegs, I want to have a text field that shows the title of the image inserted BUT without the .jpg at the end?


To explain, If i drag an image named "picture1" and place it in a <<container_name>>

the result is <<picture1.jpg>> how do i prevent the .jpg displaying? I just want <<picture1>>


Many thanks

Share this post

Link to post
Share on other sites

Undoubtedly there's a more elegant way, but this would probably do it:


Substitute( Substitute ( container_name ; ".jpg" ; "" ) ; ".JPG" ; "")

Share this post

Link to post
Share on other sites

Thanks for the reply Matthew but i can't get that to work?

To display the name i am simply creating a text field <<containername e.g. A1>> resulting in <<picture123.jpg>>

I want it to be <<picture123>>


Thanks again

Share this post

Link to post
Share on other sites

OK.  I'm not sure that the '<<' and '>>' means in your question.  I'm assuming that your are not talking about merge fields which use those kinds of brackets to insert variables in a line of text on a layout.  Correct me if I'm wrong.


Substitute( Substitute ( container_name ; ".jpg" ; "" ) ; ".JPG" ; "")


The calculation above can be used in several different ways to get you the output you want.  One way would be to use it in the definition of a new calculated field that strips the '.jpg' off of the contents of container_name.  You could also use it in a script that strips the .'jpg' off of your text field and replaces it with the new value.  This script could be initiated by the user with  a button on your layout or, more automatically, by attaching it to a script trigger ('On Save') on the container_name field.   


The way you implement it will depend on how you would like your solution to behave.  Am I making sense?  


P.S.  When you specify the calculation to a script or to a field definition, I'd suggest using the built-in tools for picking field names and commands.  That way you won't forget to add in the table name for related fields  (e.g. Related Table::container_name).  Also you will make fewer syntax mistakes in the commands themselves (or inherit my mistakes). 

Share this post

Link to post
Share on other sites

HI Matthew, Thank You!!..

Your explanation worked perfectly 

Share this post

Link to post
Share on other sites

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
Sign in to follow this  
Followers 0

  • Similar Content

    • Receipt Container
      By james211
      I'm building a database for my coffee roasting.  I want to have a layout for storing all the receipts from the green beans I purchase from my vendors.  How would I go about creating a layout that lets me keep adding files without creating multiple containers manually?
    • Container export to IOS Photo app?
      By 34South
      I have developed a solution for IOS devices which also utilizes scripts that facilitate importing of GPS coordinates and especially photos from the device, i.e. iPhone or iPad, within FMGo. Although I have scripted the possibility of emailing images originally captured by the solution outside of the solution, there does not seem to be a possibility for exporting the captured image to the Photos app and thus pushing them to the iCloud. I know one could first capture the image in the Camera app and then import it into a container within the solution, but this distracts from the all-in-one nature of my solution, where quick image capture is paramount. Ideally, the user would use the solution to capture the image and related contextual data, but also elect to save such an image in the Photo app at a later stage to permit sharing it to social media apps, for example.
       I'm fairly advanced, having used FM since the Claris days.
    • PDF on FileMaker Server 14 (Windows) generating security error
      By typewriter
      I am experiencing a nasty problem with a Filemaker Server on Windows Server 2012R2. PDF s in a container field don't display, but instead either one of two things happen:
      1 on FMPA14 running on Terminal Server (Windows), an error displays 'Security settings do not allow downloading this file' (or something similar, the message is in Dutch). the dialog doesn't display a FileMaker icon, only a yellow warning sign (Windows?). The Terminal server has Acrobat Reader DC installed, which can open the PDF locally. Opening the FMP database with the FMPA locally displays the PDF, both stroed 'in file' and as Remote Container.
      2 on FMP14 running on a normal Windows workstation, the PDF is opened in Adobe Acrobat in a separate window instead of being displayed in the container field.
      We checked ports 80, 443, 16000 and 16001 being blocked on the Firewall (clients and server are within the same LAN). PNG and JPG will display OK, and the PDFs are stored properly, so it seems.
      Where is this security error coming from? 
      Could it be a problem with Windows Server 2012 not allowing Tomcat Server to run? And if so, what can I do to fix this?
    • Signature in FilemakerPro 14
      By muskee
      Hi everyone!
      I'm currently using filemaker pro advanced 14, and I'm making some layouts for the Ipad platform. Is there a way to set up a container field to capture signatures via this method? how?
    • Insert PDF is greyed out on my container field
      By Brad Mathews
      The Insert PDF context menu item is greyed out on my container field when I have my database open locally. My Google Fu has failed me on solving this.
      My container field is on a layout, not in a portal. I have Interactive Content checked. I have a PDF viewer working in IE. (Zeon - I do not know where I got this plugin - I very rarely use IE.). I also have an older version of NitroPDF Pro which I use daily, but no IE plugin at the moment. The container field Storage settings are "Store container data externally" and using Open storage option. I also tried the secure storage option which was the default. I have FM Pro 14.0.4 and this database is not converted from earlier version. I am using Windows 10 I can drag and drop a PDF into the container and I get the PDF icon, but it is not interactive However it is interactive (both native and WebDirect) when I upload the database to FM Server - which is also my local computer for now.  But in all cases Insert PDF is greyed out. The only other solution that the web has coughed up it to use the newest version of Adobe Acrobat Reader which is not an option - I refuse to use that piece of #$@&.
      What else can I try?
      Thanks, Brad