After spending a good portion of today trying to figure out why my script to navigate to a layout was not working for a particular new layout, I was able to narrow the issue down to what I consider a nasty bug in FileMaker Pro 11.0v2 (I haven’t tested with 11.0v1 but I see no reason why it wouldn’t also exist there). In short, be careful to not have any layout folder names that are similar to layout names as FileMaker will get confused and fail to access the designated layout when its name is placed within a Go To Layout Via Calculation script step.
The following video demonstrates the problem.
Filemaker internally treats the groups as normal layouts for backward compatibility. This was also the case with script groups. Someone should tell filemaker to store an alternative name internally, like ‘–groupname’. This would avoid the problems with identical names.
Tthe “backward compatibility” argument doesn’t make sense as there’s plenty of examples of new features which don’t appear (either visually or logically) in prior verions which support the same file format. The fact that Layout Folders “interally” are stored at the same level as layouts themselves is just bad programming design. Further, the LayoutNames() function does NOT return Layout Folders. So, how could one make the argument they are in actuality layouts?
For backward compatibility FMI could have simply flattened the folders and not shown anything rather than converting Layout Folders to actual layouts. I’m sure they did it this way as it was more convenient to program.
Bill,
Have you tested with different creation order and layout order? Since you posted this I realised I do the same thing in BaseElements 3, but I have the layout before the folder with the same name, and I’ve not noticed this issue.
Cheers,
Nick
Yeah FMP grabs the first matching named folder or layout, so, yes putting the actual layout you want ahead of a like named folder doesn’t cause any problem.