Jump to content

  •  

UPGRADE DEADLINE - SEPTEMBER 26, 2014!
FileMaker Inc. has a deadline for users of version 10,11, 12 as Individual box or volume licenses (with expired maintenance).
If you don't renew your maintenance and upgrade to FMP 13 you will no longer be eligible to upgrade, at the discount pricing.

Volume Licensing upgrade pricing for FileMaker Pro 13, FileMaker Pro 13 Advanced and FileMaker Server 13 will be discontinued.
Individual upgrade pricing for FileMaker Pro 13 and FileMaker Pro 13 Advanced will increase after September 26, 2014.
As of 27-September-2014, FileMaker 10 products will no longer be available for purchase or support.

http://help.filemaker.com/app/answers/detail/a_id/13865


Photo

Container Field label Lookup

container jpg title

  • Please log in to reply
4 replies to this topic

#1 beckham  novice

beckham
  • Members
  • 41 posts
  • LocationUK
  • FM Application:13
  • Platform:Mac OS X Mavericks
  • Skill Level:Novice
  • Certification:12
  • Time Online: 3h 3m 30s

Posted 27 January 2014 - 09:08 AM

Hi

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


  • 0

#2 Matthew F  addict

Matthew F
  • Members
  • 785 posts
  • LocationSeattle
  • FM Application:13 Advance
  • Platform:Mac OS X Mavericks
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 6d 1h 31m 13s

Posted 27 January 2014 - 10:45 AM

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

 

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


  • 0

#3 beckham  novice

beckham
  • Members
  • 41 posts
  • LocationUK
  • FM Application:13
  • Platform:Mac OS X Mavericks
  • Skill Level:Novice
  • Certification:12
  • Time Online: 3h 3m 30s

Posted 28 January 2014 - 12:26 PM

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


  • 0

#4 Matthew F  addict

Matthew F
  • Members
  • 785 posts
  • LocationSeattle
  • FM Application:13 Advance
  • Platform:Mac OS X Mavericks
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 6d 1h 31m 13s

Posted 29 January 2014 - 01:53 PM

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


  • 0

#5 beckham  novice

beckham
  • Members
  • 41 posts
  • LocationUK
  • FM Application:13
  • Platform:Mac OS X Mavericks
  • Skill Level:Novice
  • Certification:12
  • Time Online: 3h 3m 30s

Posted 09 February 2014 - 12:11 PM

HI Matthew, Thank You!!..

Your explanation worked perfectly 


  • 0





FMForum Advertisers