Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I allow a user to pick a file and then store the path?

Useful FileMaker Tips

How do I allow a user to pick a file and then store the path?

by  drtree  Posted    (Edited  )
This is a helpful tip I found out (via Google) which turned out to be pretty useful. It's for FileMaker 7 and above, and it will give you the ability to allow a user to select a file and then allow you to store it's path.

So here's how it goes...

1. Create a container field in your table (I'll call it "YourContainerField"). This will store a reference to the file the user selects

2. Create a text field in your table (I'll call it "YourTextField"). This will store the file's path

3. Create a script with the following steps:
Code:
   Insert File[Reference; YourContainerField]
   Set Field [YourTextField;GetValue(YourContainerField;2)]

Please note that I'm having some trouble getting that second line to format correctly - so the second and third lines in that code block are all part of the "Set Field" script step.
The reference to the file will be stored in the container field, and the text field will contain the actual path to the file. In the layout where I posted this code, I hid the container field (by making it the same color as the layout's background) and didn't allow for entry in Find or Browse mode.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top