Get ( LayoutTableName ) works in the front end file when using the Data separation model just like it does witn a single file solution. Did you perhaps use it in a calculation field that was not defined to be unstored?
To make sure i'm not doing anything wrong i've made a function only file. Like you can see in the attached image the file with the name DATA the field works fine. In the file UI (which uses the table from DATA) the function doesn't work.
An other function Get (LayoutName) works fine.
I also checked this function before posting my original answer. Please see the red circled field in this screen shot. I defined a calculation field in the data file as
Get ( LayoutTableName )
I selected text as the return type, then clicked the storage options button and specified that this calculation field be unstored.
This test was done on Windows XP using Filemaker 11. I have no reason to believe that changing platforms or versions will change the results returned by this function.
Note: if I do not select the "do not store..." storage option for this field or if I use the Auto-entered calculation field option, then no get function I choose to use like this will update correctly nor will it show a value for existing records in the case of auto-entered calculations.
Thank for your effort!
The same setup in FM11 shows the same problems with the separation setup.
I've uploaded the 2 documents. So if you have time please look at them.
Now I am really scratching my head. So far, I cannot reproduce the results I posted earlier...
I've even hosted the file from server just like I did the last time and still get an empty field...
I may come back to it later and figure out what's different, but so far, no go...
My current thought is to write this up in Report an Issue as a bug...
It's very strange indeed. In the test file duplicated the calculation field and tested other get functions.
Layout name etc. And it all worked. So I think it's a bug..
For what little it's worth, it seems to work correctly on OS X 10.8 and FMPA 12v0.3.
I used the OnLayoutEnter trigger with a script that sets a global variable to Get( LayoutTableName). Displayed on the layout in the UI file as a merge variable, it showed the correct table name from the DB file.
Jade, that sounds like an execellent work around, but what we were testing was an unstored calculation field--that may still be an issue with your OS and version of FileMaker.
You are right. It only works if the calculation field is stored (or global). Unstored calculations are blank on the ui layout but correct on the data.
OS X 10.8 with FMPA 12v0.3