Local variale use in script step

I have set a local variable: $Filename is thename.

I want to use it in other script steps, such as "Save a Copy", as below,
where the path name in that script step is:

file:/C:/Documents and Settings//$Filename.51_backup.fp7

However, the filename it saves is literally:
$Filename.51_backup.fp7, rather than
thename.51_backup.fp7

That is, it does not substitute the variable contents.

What am I doing wrong?
trashadd5 [ Mi, 21 November 2007 06:53 ] [ ID #1875781 ]

Re: Local variale use in script step

On Nov 20, 10:53 pm, "David Robins, MD" <trasha... [at] bigfoot.com> wrote:
> I have set a local variable: $Filename is thename.
>
> I want to use it in other script steps, such as "Save a Copy", as below,
> where the path name in that script step is:
>
> file:/C:/Documents and Settings//$Filename.51_backup.fp7
>
> However, the filename it saves is literally:
> $Filename.51_backup.fp7, rather than
> thename.51_backup.fp7
>
> That is, it does not substitute the variable contents.
>
> What am I doing wrong?

FileMaker won't accept a combination of a variable and 'constant'
values as a filepath. You have to build the entire file path into a
single variable and use that.

I.e.
Set Variable[$filepath; "file:/C:/Documents and Settings//" &
$Filename & ".51_backup.fp7"]

then Save As[$filepath]
Grip [ Mi, 21 November 2007 06:59 ] [ ID #1875782 ]
Datenbanken » comp.databases.filemaker » Local variale use in script step

Vorheriges Thema: Lookup
Nächstes Thema: Using checkbox and script to delete sets of records