What does Get ( FileName ) all by itself return?
The name of the file you run it from within.
Under normal circumstances, yes. I was asking in this specific case.
the correct filename without the .fmp12 tag
Not trying to be a dick but what help would the exact result be?
Their are no spaces and only letters in the filename. No punctuation, no numbers, nothing but Aa-Zz
I think I'll let you figure it out. Since apparently you take offense at diagnostic questions.
Not trying to be a ... whatever, of course.
I didn't take offense. I am just not at liberty to make details public
Sent from my iPhone
Are you able to open the file which contains the layout names you want a list of?
If yes, I have a script I will share which will retrieve all the layout names in a text string.
Yes I can open the file.
Set Variable ($v1 = LayoutNames (Get(FileName)))
Set Variable ($v2 = LayoutNames (""))
The run time results in the data viewer show
$v1 = incomplete list
$v2 = complete list
It's entirely possible that the name of the file is a reserved word, the name of a function, or something else that FileMaker can't parse (or is preferentially parsing as something other than a file name).
Hence the question of the name.
Here is s script which works for me.
I defined a global number field gCount in the file I wanted a list of layout names for.
I defined the Text Field List_Layouts in the same file.
The script is as follows:
Script Name [FetchLayoutNames]
Enter Browse Mode
Set Field (MyFile::gCount; 1)
Go to Layout (MyFile::gCount)
Set Field (MyFile::List_Layouts; MyFile::List_Layouts & "¶" & Get(LayoutNumber) & ") " & Get(LayoutName)
Set Field (MyFile::gCount; MyFile::gCount + 1)
Exit Loop If (MyFile::gCount > Get(LayoutCount))
This script works with FileMaker 8 through FileMaker 11
After you open the file, does your FM program permit you to save a clone of the file?
If yes, you might try opening the NO RECORDS CLONE ONLY, then importing the records from
the original file into the clone, using matching field names as the import map.