dbTalk Databases Forums  

Can you display the path/filename to

comp.databases.filemaker comp.databases.filemaker


Discuss Can you display the path/filename to in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Iced Tea
 
Posts: n/a

Default Can you display the path/filename to - 01-06-2007 , 05:11 PM






a container?

I am using FMP Advanced 8.5
I have a field setup that is a container to store JPGs. Is it possible to
have the path and filename display for the JPG for each record?


Thanks,

Carl



Reply With Quote
  #2  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Can you display the path/filename to - 01-06-2007 , 05:14 PM






Yes, if the image is stored by reference.

Just have a calc field with a TEXT result = the container field

You will get three lines of information, including the path and filename.

"Iced Tea" <icedteas (AT) cox (DOT) net> wrote

Quote:
a container?

I am using FMP Advanced 8.5
I have a field setup that is a container to store JPGs. Is it possible to
have the path and filename display for the JPG for each record?


Thanks,

Carl




Reply With Quote
  #3  
Old   
Iced Tea
 
Posts: n/a

Default Re: Can you display the path/filename to - 01-07-2007 , 04:11 PM



I am having trouble trying to make the calculation to extract just the
filename?


"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote

Quote:
Yes, if the image is stored by reference.

Just have a calc field with a TEXT result = the container field

You will get three lines of information, including the path and filename.

"Iced Tea" <icedteas (AT) cox (DOT) net> wrote in message
news:n0Wnh.12106$lD5.11906 (AT) newsfe14 (DOT) phx...
a container?

I am using FMP Advanced 8.5
I have a field setup that is a container to store JPGs. Is it possible
to have the path and filename display for the JPG for each record?


Thanks,

Carl






Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: Can you display the path/filename to - 01-11-2007 , 03:29 PM



Look at Text Functions in Help: Value, Position and Middle.

My field ImageText returns these lines as text (as Bill described):

size:428,397
image:../../Desktop/Matt MVC-610F.png
imagemac:/HDX/Users/matt/Desktop/Matt MVC-610F.png

The filename is the last portion of both the second and third lines, each of which is what FileMaker calls a Value. Let's extract THE IMAGE NAME it from the second line.

MyImage =

Let (
[ theText = GetValue ( ImageText ; 2 ) ;
Start = Position ( theText ; "Matt" ; 1 ; 1 ) +5 ] ;

Middle ( theText ; Start ; 99 ) )

In English:

GetValue isolates the second line of ImageText (theText).

Position locates the first occurrence of "Matt" in theText. The beginning of the image name is 5 characters past that point (Start) .

I use Middle because I can begin at a specific point (Start) in specific text (theText) and extract enough characters (99) to guarantee we will get to the end of the line. In reality, it could be shorter, but 99 doesn't hurt anything.

The result of the above calc is the image name "MVC-610F.png"

THe Let statement is used because it helps to organize things a little better with variable names instead of cluttering up a single calculation with a whole bunch of functions. It could be done without Let, but it would be a lot more confusing. Without Let,

MyImage =

Middle ( GetValue ( ImageText ; 2 ) ; Position ( GetValue ( ImageText ; 2 ) ; "Matt" ; 1 ; 1 ) +5 ; 99 ) )

You decide.

Matt

On 01/07/2007 17:11:05 "Iced Tea" <icedteas (AT) cox (DOT) net> wrote:

Quote:
I am having trouble trying to make the calculation to extract just the
filename?

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote in message
news:EvidnV_PWcgdsD3YnZ2dnUVZ_ruknZ2d (AT) comcast (DOT) com...

Yes, if the image is stored by reference.

Just have a calc field with a TEXT result = the container field

You will get three lines of information, including the path and filename.

"Iced Tea" <icedteas (AT) cox (DOT) net> wrote in message
news:n0Wnh.12106$lD5.11906 (AT) newsfe14 (DOT) phx...

a container?

I am using FMP Advanced 8.5 I have a field setup that is a container to
store JPGs. Is it possible to have the path and filename display for
the JPG for each record?

Thanks,

Carl

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.