FileMaker 12以降(たぶん)

 

現在のレイアウトのBaseTableNameを取得

function(関数):
Sample output(出力例):
formula(式):

/*
2021/12/23
変数のコンフリクトを避けるために $ 未使用に変更
*/

Let ([
_query = " 
SELECT 
'~'||TableName||'='||'\"'||BaseTableName||'\"'
FROM FileMaker_Tables 
"
; _Result =  ExecuteSQL ( _query ; "" ; ";¶" )
;_Formula = "Let ( [¶" & _Result & "¶];¶" & "~" & Get ( レイアウトテーブル名 ) & "¶)"
;_BaseTableName=Evaluate ( _Formula )
];
_BaseTableName
)


/*以前の式*/
/*
Let ([
_query = " 
SELECT 
'$'||TableName||'='||'\"'||BaseTableName||'\"'
FROM FileMaker_Tables 
"
; _Result =  ExecuteSQL ( _query ; "" ; ";" )
;_ER=Evaluate ( "Let ( [" & _Result & "] ; 0 )" )
;_BaseTableName=Evaluate ( "$" & Get ( LayoutTableName ) )
];
_BaseTableName
)
*/