导出缓慢的原因可能是相关字段和您正在导出的任何未存储的计算。您可以通过使用缓存字段、非相关、非计算字段来解决此问题,这些字段在导出之前通过Replace Field Contents
在服务器上执行的各种脚本步骤进行更新。
将脚本分成三个脚本,Find Records to Export
、Update Caches
和Export Report
。它们看起来像这样:
Find Records to Export
Go to Layout [ "LayoutWithFieldsToReplace" ]
Enter Find Mode [ Pause: Off ]
Set Field [ TABLE::field ; // find criterion for this field ]
Set Field [ ...
Set Error Capture [ On ]
Perform Find []
Update Caches
Perform Script [ Find Records to Export ]
Replace Field Contents [ TABLE::cache_1 ; RELATED::field ]
Replace Field Contents [ TABLE::cache_2 ; TABLE::unstored_calc ]
Replace Field Contents [ ...
Export Report
Perform Script on Server [ Update Caches ]
Perform Script [ Find Records to Export ]
Export Records [ ...
我不确定 FileMaker 是否已更改为要求,但我认为您需要替换内容的字段在替换期间需要在布局上。因此,请确保您导航到的布局具有它们,在上面的脚本中,它们将是TABLE::cache_1
and TABLE::cache_2
。