dbTalk Databases Forums  

Path to File

comp.databases.filemaker comp.databases.filemaker


Discuss Path to File in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
This Being Milt
 
Posts: n/a

Default Path to File - 12-07-2005 , 03:15 PM






I've tried to find the answer to this myself but haven't had any luck,
so once again I turn to the group. Basically the database I have
created is a task manager. When the employee finishes their task they
save out a file. I need to be able to place a reference to this file
(i.e. the file path) into the database.

What I would like to be able to do is have a text field called
"filePath" with a Browse button next to it. The user clicks the
button, navigates to their file, chooses it, and the path to that file
is saved in the database. I don't need an actual link to the file or
anything, just the path to the file converted to text and placed in the
field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


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

Default Re: Path to File - 12-07-2005 , 04:31 PM






Milt,

You don't say what kind of file they save out, or what means you use to do
that.

If it is, for example, "Export field contents..." under user control, you
won't automatically be able to learn what name they gave the file. There is
no Get(LastUserExportFileName) function.

You could save the file under predetermined means, for example by
Get(DocumentsPath) to determine the user's documents directory, then
appending your file name. Once you build the file name for export, you could
of course save that path in any field.

A problem with the second method is that a user can always delete or move
whatever file they've exported, so the saved path in your database file
would be not very useful. You might want to consider:

1) building the output path name
2) exporting the file to this predetermined location
3) importing the file into a FileMaker field
4) [optionally] storing the path of the original export.

---
"Giving FileMaker tips to newbies is like
giving automatic weapons to infants."
-Bill Marriott


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote

Quote:
I've tried to find the answer to this myself but haven't had any luck, so
once again I turn to the group. Basically the database I have created is
a task manager. When the employee finishes their task they save out a
file. I need to be able to place a reference to this file (i.e. the file
path) into the database.

What I would like to be able to do is have a text field called "filePath"
with a Browse button next to it. The user clicks the button, navigates to
their file, chooses it, and the path to that file is saved in the
database. I don't need an actual link to the file or anything, just the
path to the file converted to text and placed in the field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke




Reply With Quote
  #3  
Old   
This Being Milt
 
Posts: n/a

Default Re: Path to File - 12-07-2005 , 05:23 PM



Hi Bill, thanks for your help. The file they save out is a proprietary
file using some software we have developed in-house. The files are
stored on our server. What I want to do is to be able to store in the
database the path to this file from the root level of the server. This
way when someone says "Hey, where's that file?" I have a reference link.

Right now I've been manually entering these paths by copying the path
from a terminal window. I have a little button next to the filePath
field that copies its contents into the clipboard. This way a few
days from now when someone emails me and asks me where a particular
file is I simply go to the appropriate record, click the button, and I
can paste the complete file path into an email.

All I really need to do is to be able to browse to a file (or to a
folder) and have the path returned as a text value.

/server/directory/directory/directory/filename.xxx

Is this possible?

On 2005-12-07 14:31:23 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Quote:
Milt,

You don't say what kind of file they save out, or what means you use to
do that.

If it is, for example, "Export field contents..." under user control,
you won't automatically be able to learn what name they gave the file.
There is no Get(LastUserExportFileName) function.

You could save the file under predetermined means, for example by
Get(DocumentsPath) to determine the user's documents directory, then
appending your file name. Once you build the file name for export, you
could of course save that path in any field.

A problem with the second method is that a user can always delete or
move whatever file they've exported, so the saved path in your database
file would be not very useful. You might want to consider:

1) building the output path name
2) exporting the file to this predetermined location
3) importing the file into a FileMaker field
4) [optionally] storing the path of the original export.

---
"Giving FileMaker tips to newbies is like
giving automatic weapons to infants."
-Bill Marriott


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120713154716807%thisbeingmilt (AT) gmailcom (DOT) ..
I've tried to find the answer to this myself but haven't had any luck,
so once again I turn to the group. Basically the database I have
created is a task manager. When the employee finishes their task they
save out a file. I need to be able to place a reference to this file
(i.e. the file path) into the database.

What I would like to be able to do is have a text field called
"filePath" with a Browse button next to it. The user clicks the
button, navigates to their file, chooses it, and the path to that file
is saved in the database. I don't need an actual link to the file or
anything, just the path to the file converted to text and placed in the
field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke

--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke



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

Default Re: Path to File - 12-07-2005 , 06:11 PM



Yes.

1) Create a container field, "c"
2) Create a script with the step:

Insert File[Reference; YourTable::c]

3) Create a field, "MyFilePath" (calculation, text result) =

Let ( [
FullURL = RightValues ( c; 1) ;
OSPrefix="filewin:";
dDelimA = "/";
dDelimB = "\\"
];

Substitute(Right(FullURL;Length(FullURL) - Length(OSPrefix));
dDelimA ; dDelimB )

)

Now, when you run this script step, the user will be prompted to locate a
file. They navigate to the file on your server. After they select the file
and click "open," a reference is stored in container field c.

The reference looks like this, internal to "c":

file:MyServerFile.xyz
filewin://Server/Volume/Directory/MyServerFile.xyz

(FileMaker shows the document icon, or image, or media file in Browse mode,
but has the text version of it stored as well, accessible to formulas. The
full path is only available when the file is stores as a "reference.")

The calculation in MyFilePath just strips out the beginning "filewin:"
business and converts the "/" to "\" so it's appropriate for pasting into
the address bar of any Windows Explorer or IE window. You'll want to adjust
that formula if you are not running in an all-Windows environment. The
result of the MyFilePath is:

\\Server\Volume\Directory\MyServerFile.xyz

Bill


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote

Quote:
Hi Bill, thanks for your help. The file they save out is a proprietary
file using some software we have developed in-house. The files are stored
on our server. What I want to do is to be able to store in the database
the path to this file from the root level of the server. This way when
someone says "Hey, where's that file?" I have a reference link.

Right now I've been manually entering these paths by copying the path from
a terminal window. I have a little button next to the filePath field that
copies its contents into the clipboard. This way a few days from now
when someone emails me and asks me where a particular file is I simply go
to the appropriate record, click the button, and I can paste the complete
file path into an email.

All I really need to do is to be able to browse to a file (or to a folder)
and have the path returned as a text value.

/server/directory/directory/directory/filename.xxx

Is this possible?

On 2005-12-07 14:31:23 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Milt,

You don't say what kind of file they save out, or what means you use to
do that.

If it is, for example, "Export field contents..." under user control, you
won't automatically be able to learn what name they gave the file. There
is no Get(LastUserExportFileName) function.

You could save the file under predetermined means, for example by
Get(DocumentsPath) to determine the user's documents directory, then
appending your file name. Once you build the file name for export, you
could of course save that path in any field.

A problem with the second method is that a user can always delete or move
whatever file they've exported, so the saved path in your database file
would be not very useful. You might want to consider:

1) building the output path name
2) exporting the file to this predetermined location
3) importing the file into a FileMaker field
4) [optionally] storing the path of the original export.

---
"Giving FileMaker tips to newbies is like
giving automatic weapons to infants."
-Bill Marriott


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120713154716807%thisbeingmilt (AT) gmailcom (DOT) ..
I've tried to find the answer to this myself but haven't had any luck,
so once again I turn to the group. Basically the database I have
created is a task manager. When the employee finishes their task they
save out a file. I need to be able to place a reference to this file
(i.e. the file path) into the database.

What I would like to be able to do is have a text field called
"filePath" with a Browse button next to it. The user clicks the button,
navigates to their file, chooses it, and the path to that file is saved
in the database. I don't need an actual link to the file or anything,
just the path to the file converted to text and placed in the field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke




Reply With Quote
  #5  
Old   
This Being Milt
 
Posts: n/a

Default Re: Path to File - 12-07-2005 , 07:08 PM



Hi Bill. When I recreate your calculation below I get an error where
the FullURL in the substitute function is highlighted and FMP tells me
that the field cannnot be found.

On 2005-12-07 16:11:58 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Quote:
Yes.

1) Create a container field, "c"
2) Create a script with the step:

Insert File[Reference; YourTable::c]

3) Create a field, "MyFilePath" (calculation, text result) =

Let ( [
FullURL = RightValues ( c; 1) ;
OSPrefix="filewin:";
dDelimA = "/";
dDelimB = "\\"
];

Substitute(Right(FullURL;Length(FullURL) - Length(OSPrefix));
dDelimA ; dDelimB )

)

Now, when you run this script step, the user will be prompted to locate
a file. They navigate to the file on your server. After they select the
file and click "open," a reference is stored in container field c.

The reference looks like this, internal to "c":

file:MyServerFile.xyz
filewin://Server/Volume/Directory/MyServerFile.xyz

(FileMaker shows the document icon, or image, or media file in Browse
mode, but has the text version of it stored as well, accessible to
formulas. The full path is only available when the file is stores as a
"reference.")

The calculation in MyFilePath just strips out the beginning "filewin:"
business and converts the "/" to "\" so it's appropriate for pasting
into the address bar of any Windows Explorer or IE window. You'll want
to adjust that formula if you are not running in an all-Windows
environment. The result of the MyFilePath is:

\\Server\Volume\Directory\MyServerFile.xyz

Bill


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120715232516807%thisbeingmilt (AT) gmailcom (DOT) ..
Hi Bill, thanks for your help. The file they save out is a proprietary
file using some software we have developed in-house. The files are
stored on our server. What I want to do is to be able to store in the
database the path to this file from the root level of the server. This
way when someone says "Hey, where's that file?" I have a reference link.

Right now I've been manually entering these paths by copying the path
from a terminal window. I have a little button next to the filePath
field that copies its contents into the clipboard. This way a few
days from now when someone emails me and asks me where a particular
file is I simply go to the appropriate record, click the button, and I
can paste the complete file path into an email.

All I really need to do is to be able to browse to a file (or to a
folder) and have the path returned as a text value.

/server/directory/directory/directory/filename.xxx

Is this possible?

On 2005-12-07 14:31:23 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Milt,

You don't say what kind of file they save out, or what means you use to
do that.

If it is, for example, "Export field contents..." under user control,
you won't automatically be able to learn what name they gave the file.
There is no Get(LastUserExportFileName) function.

You could save the file under predetermined means, for example by
Get(DocumentsPath) to determine the user's documents directory, then
appending your file name. Once you build the file name for export, you
could of course save that path in any field.

A problem with the second method is that a user can always delete or
move whatever file they've exported, so the saved path in your database
file would be not very useful. You might want to consider:

1) building the output path name
2) exporting the file to this predetermined location
3) importing the file into a FileMaker field
4) [optionally] storing the path of the original export.

---
"Giving FileMaker tips to newbies is like
giving automatic weapons to infants."
-Bill Marriott


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120713154716807%thisbeingmilt (AT) gmailcom (DOT) ..
I've tried to find the answer to this myself but haven't had any luck,
so once again I turn to the group. Basically the database I have
created is a task manager. When the employee finishes their task they
save out a file. I need to be able to place a reference to this file
(i.e. the file path) into the database.

What I would like to be able to do is have a text field called
"filePath" with a Browse button next to it. The user clicks the
button, navigates to their file, chooses it, and the path to that file
is saved in the database. I don't need an actual link to the file or
anything, just the path to the file converted to text and placed in the
field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke

--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke



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

Default Re: Path to File - 12-08-2005 , 01:33 AM



You are using FM7 or FM8 right? You probably have a typo in there.

1) Copy and paste everything in my original message from the "Let" to the
ending ")" (alone by itself). I just did the same to double-check, and it
works.

- Don't add a semicolon to the end of the line starting with dDelimB
- The brackets "[" and "]" are required
- Did you think I made a mistake by using "\\" instead of "\"? I didn't. the
"\\" is required because within a string, \ is an "escape" character that
enables you to include a quote inside a quote. So inside calcs, \" means "
and \\ means \.

2) If, for some reason, your newsgroup server/newsgroup reader is mangling
the readable version, here is a more compact form. Use everything between
the blank lines:



Let([FullURL=RightValues(c;1);OSPrefix="filewin:";
dDelimA="/";dDelimB="\\"];
Substitute(Right(FullURL;Length(FullURL)-
Length(OSPrefix));dDelimA;dDelimB))



The Let() function is a little weird to understand at first, but here is
what it does:

You could easily say in a formula:

2 + 7 + 13

to get a result of 22. Alternately you could say, in "English"

a = 2
b = 7
c = 13

a + b + c

The Let() function enables you to use variable names (within the current
calculation) like this without creating separate fields for them.

Let ([
a = 2;
b = 7;
c = 13
];
a + b + c
)

It just requires some extra "punctuation," specifically:

- "Let(" to mark the beginning of the function
- "[" to mark the beginning of the variables list
- ";" to indicate the end of a variable/value pair (except the last pair!)
- "];" to mark the end of the variable declarations, and the beginning of
the calculation that uses them
- ")" to mark the very end of the Let function

You probably wouldn't use Let() when you are using simple values like 2, 7,
and 12. But when a component of your calculation is long and complicated and
you have to use that component more than once, Let() dramatically assists in
readability and processing speed.

In this case, I used Let() so that you could see more clearly how I am
slicing up the values stored in "c" and also so that you could modify this
to handle cross-platform stuff later on. Without using Let() the function
looks like:

Substitute(Right(RightValues(c;1);Length(RightValu es(c;1))-
Length("filewin:"));"/";"\\")

Good luck.

Bill

"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote

Quote:
Hi Bill. When I recreate your calculation below I get an error where the
FullURL in the substitute function is highlighted and FMP tells me that
the field cannnot be found.

On 2005-12-07 16:11:58 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Yes.

1) Create a container field, "c"
2) Create a script with the step:

Insert File[Reference; YourTable::c]

3) Create a field, "MyFilePath" (calculation, text result) =

Let ( [
FullURL = RightValues ( c; 1) ;
OSPrefix="filewin:";
dDelimA = "/";
dDelimB = "\\"
];

Substitute(Right(FullURL;Length(FullURL) - Length(OSPrefix));
dDelimA ; dDelimB )

)

Now, when you run this script step, the user will be prompted to locate a
file. They navigate to the file on your server. After they select the
file and click "open," a reference is stored in container field c.

The reference looks like this, internal to "c":

file:MyServerFile.xyz
filewin://Server/Volume/Directory/MyServerFile.xyz

(FileMaker shows the document icon, or image, or media file in Browse
mode, but has the text version of it stored as well, accessible to
formulas. The full path is only available when the file is stores as a
"reference.")

The calculation in MyFilePath just strips out the beginning "filewin:"
business and converts the "/" to "\" so it's appropriate for pasting into
the address bar of any Windows Explorer or IE window. You'll want to
adjust that formula if you are not running in an all-Windows environment.
The result of the MyFilePath is:

\\Server\Volume\Directory\MyServerFile.xyz

Bill


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120715232516807%thisbeingmilt (AT) gmailcom (DOT) ..
Hi Bill, thanks for your help. The file they save out is a proprietary
file using some software we have developed in-house. The files are
stored on our server. What I want to do is to be able to store in the
database the path to this file from the root level of the server. This
way when someone says "Hey, where's that file?" I have a reference link.

Right now I've been manually entering these paths by copying the path
from a terminal window. I have a little button next to the filePath
field that copies its contents into the clipboard. This way a few days
from now when someone emails me and asks me where a particular file is I
simply go to the appropriate record, click the button, and I can paste
the complete file path into an email.

All I really need to do is to be able to browse to a file (or to a
folder) and have the path returned as a text value.

/server/directory/directory/directory/filename.xxx

Is this possible?

On 2005-12-07 14:31:23 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Milt,

You don't say what kind of file they save out, or what means you use to
do that.

If it is, for example, "Export field contents..." under user control,
you won't automatically be able to learn what name they gave the file.
There is no Get(LastUserExportFileName) function.

You could save the file under predetermined means, for example by
Get(DocumentsPath) to determine the user's documents directory, then
appending your file name. Once you build the file name for export, you
could of course save that path in any field.

A problem with the second method is that a user can always delete or
move whatever file they've exported, so the saved path in your database
file would be not very useful. You might want to consider:

1) building the output path name
2) exporting the file to this predetermined location
3) importing the file into a FileMaker field
4) [optionally] storing the path of the original export.

---
"Giving FileMaker tips to newbies is like
giving automatic weapons to infants."
-Bill Marriott


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120713154716807%thisbeingmilt (AT) gmailcom (DOT) ..
I've tried to find the answer to this myself but haven't had any luck,
so once again I turn to the group. Basically the database I have
created is a task manager. When the employee finishes their task they
save out a file. I need to be able to place a reference to this file
(i.e. the file path) into the database.

What I would like to be able to do is have a text field called
"filePath" with a Browse button next to it. The user clicks the
button, navigates to their file, chooses it, and the path to that file
is saved in the database. I don't need an actual link to the file or
anything, just the path to the file converted to text and placed in
the field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke




Reply With Quote
  #7  
Old   
This Being Milt
 
Posts: n/a

Default Re: Path to File - 12-08-2005 , 12:52 PM



Ah, I see what happened. There was an errant character in the text
which wasn't showing up in FMP but was visible when I pasted it into a
text editor.

Apart from this the script worked perfectly. Once again, Bill, thank
you very much!

Lee



On 2005-12-07 23:33:54 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Quote:
You are using FM7 or FM8 right? You probably have a typo in there.

1) Copy and paste everything in my original message from the "Let" to
the ending ")" (alone by itself). I just did the same to double-check,
and it works.

- Don't add a semicolon to the end of the line starting with dDelimB
- The brackets "[" and "]" are required
- Did you think I made a mistake by using "\\" instead of "\"? I
didn't. the "\\" is required because within a string, \ is an "escape"
character that enables you to include a quote inside a quote. So inside
calcs, \" means " and \\ means \.

2) If, for some reason, your newsgroup server/newsgroup reader is
mangling the readable version, here is a more compact form. Use
everything between the blank lines:



Let([FullURL=RightValues(c;1);OSPrefix="filewin:";
dDelimA="/";dDelimB="\\"];
Substitute(Right(FullURL;Length(FullURL)-
Length(OSPrefix));dDelimA;dDelimB))



The Let() function is a little weird to understand at first, but here
is what it does:

You could easily say in a formula:

2 + 7 + 13

to get a result of 22. Alternately you could say, in "English"

a = 2
b = 7
c = 13

a + b + c

The Let() function enables you to use variable names (within the
current calculation) like this without creating separate fields for
them.

Let ([
a = 2;
b = 7;
c = 13
];
a + b + c
)

It just requires some extra "punctuation," specifically:

- "Let(" to mark the beginning of the function
- "[" to mark the beginning of the variables list
- ";" to indicate the end of a variable/value pair (except the last pair!)
- "];" to mark the end of the variable declarations, and the beginning
of the calculation that uses them
- ")" to mark the very end of the Let function

You probably wouldn't use Let() when you are using simple values like
2, 7, and 12. But when a component of your calculation is long and
complicated and you have to use that component more than once, Let()
dramatically assists in readability and processing speed.

In this case, I used Let() so that you could see more clearly how I am
slicing up the values stored in "c" and also so that you could modify
this to handle cross-platform stuff later on. Without using Let() the
function looks like:

Substitute(Right(RightValues(c;1);Length(RightValu es(c;1))-
Length("filewin:"));"/";"\\")

Good luck.

Bill

"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120717080616807%thisbeingmilt (AT) gmailcom (DOT) ..
Hi Bill. When I recreate your calculation below I get an error where
the FullURL in the substitute function is highlighted and FMP tells me
that the field cannnot be found.

On 2005-12-07 16:11:58 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Yes.

1) Create a container field, "c"
2) Create a script with the step:

Insert File[Reference; YourTable::c]

3) Create a field, "MyFilePath" (calculation, text result) =

Let ( [
FullURL = RightValues ( c; 1) ;
OSPrefix="filewin:";
dDelimA = "/";
dDelimB = "\\"
];

Substitute(Right(FullURL;Length(FullURL) - Length(OSPrefix));
dDelimA ; dDelimB )

)

Now, when you run this script step, the user will be prompted to locate
a file. They navigate to the file on your server. After they select the
file and click "open," a reference is stored in container field c.

The reference looks like this, internal to "c":

file:MyServerFile.xyz
filewin://Server/Volume/Directory/MyServerFile.xyz

(FileMaker shows the document icon, or image, or media file in Browse
mode, but has the text version of it stored as well, accessible to
formulas. The full path is only available when the file is stores as a
"reference.")

The calculation in MyFilePath just strips out the beginning "filewin:"
business and converts the "/" to "\" so it's appropriate for pasting
into the address bar of any Windows Explorer or IE window. You'll want
to adjust that formula if you are not running in an all-Windows
environment. The result of the MyFilePath is:

\\Server\Volume\Directory\MyServerFile.xyz

Bill


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120715232516807%thisbeingmilt (AT) gmailcom (DOT) ..
Hi Bill, thanks for your help. The file they save out is a proprietary
file using some software we have developed in-house. The files are
stored on our server. What I want to do is to be able to store in the
database the path to this file from the root level of the server. This
way when someone says "Hey, where's that file?" I have a reference link.

Right now I've been manually entering these paths by copying the path
from a terminal window. I have a little button next to the filePath
field that copies its contents into the clipboard. This way a few
days from now when someone emails me and asks me where a particular
file is I simply go to the appropriate record, click the button, and I
can paste the complete file path into an email.

All I really need to do is to be able to browse to a file (or to a
folder) and have the path returned as a text value.

/server/directory/directory/directory/filename.xxx

Is this possible?

On 2005-12-07 14:31:23 -0800, "Bill Marriott" <wjm (AT) wjm (DOT) org> said:

Milt,

You don't say what kind of file they save out, or what means you use to
do that.

If it is, for example, "Export field contents..." under user control,
you won't automatically be able to learn what name they gave the file.
There is no Get(LastUserExportFileName) function.

You could save the file under predetermined means, for example by
Get(DocumentsPath) to determine the user's documents directory, then
appending your file name. Once you build the file name for export, you
could of course save that path in any field.

A problem with the second method is that a user can always delete or
move whatever file they've exported, so the saved path in your database
file would be not very useful. You might want to consider:

1) building the output path name
2) exporting the file to this predetermined location
3) importing the file into a FileMaker field
4) [optionally] storing the path of the original export.

---
"Giving FileMaker tips to newbies is like
giving automatic weapons to infants."
-Bill Marriott


"This Being Milt" <thisbeingmilt (AT) gmail (DOT) com> wrote in message
news:2005120713154716807%thisbeingmilt (AT) gmailcom (DOT) ..
I've tried to find the answer to this myself but haven't had any luck,
so once again I turn to the group. Basically the database I have
created is a task manager. When the employee finishes their task they
save out a file. I need to be able to place a reference to this file
(i.e. the file path) into the database.

What I would like to be able to do is have a text field called
"filePath" with a Browse button next to it. The user clicks the
button, navigates to their file, chooses it, and the path to that file
is saved in the database. I don't need an actual link to the file or
anything, just the path to the file converted to text and placed in the
field.

Any suggestions on how to go about this? Thanks in advance!


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke


--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke

--
"Giving money and power to government is like
giving whiskey and car keys to teenage boys."
-- P. J. O'Rourke



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.