Jump to content
Salesforce and other SMB Solutions are coming soon. ×

File Path in Field?


natelr
 Share

Recommended Posts

Is it possible to have a button that when you click on it opens a finder window that allows you to select a file on your harddrive. Then the local path to that file is shown in a text field on the layout?

 

If so, any ideas what the script would be?

Link to comment
Share on other sites

Perform AppleScript [native applescript,

 

"tell application "Finder"

activate

set TheFile to (choose file with prompt "pick a file, any file")

end tell

 

tell me

activate

tell front window

set field "TextField" in current record to TheFile as string

end tell

end tell"]

Link to comment
Share on other sites

Alternatively, define a container that you can use in conjunction with the script step

 

insert file [reference only; target field:container]

then a calc field with text result that is simply

 

PathToFile=Container

 

this will give you the relative path (file:../ filename) and the full path according to your system (e.g. filemac:/disk/path/bla/filename)

you can parse out either if you so wish.

 

maarten

Link to comment
Share on other sites

  • 11 months later...

The process I described in post #2 works fine in FileMaker 6. (Or FileMaker 3, for that matter) You're on a PC, though? AppleScript is a Mac-only technology. There might be a vB solution, but I don't know vB.

 

The Troi File plug-in would probably let you do it, if you are open to using plug-ins.

Link to comment
Share on other sites

The process I described in post #2 works fine in FileMaker 6. (Or FileMaker 3, for that matter) You're on a PC, though? AppleScript is a Mac-only technology. There might be a vB solution, but I don't know vB.

 

The Troi File plug-in would probably let you do it, if you are open to using plug-ins.

 

Ah, but alas I am using Windows... I've been searching for a VB solution but with no luck. :(

 

- Den

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use