将找到的每个记录集导出到单个文件中?
问题描述:
这似乎是这样一个简单的操作正常,但我似乎无法使FileMaker合作。将找到的每个记录集导出到单个文件中?
我想要做什么: 1)循环遍历每个找到的记录,一次一个。 2)根据记录中的字段将此记录的内容导出到文件名。
Loop Set Variable[$path; Value:Get(FilePath) & "/../somefolder" & MyTable1::my_field_1] Export Records [No dialog; "$path"; Unicode(UTF-8)] End Loop
但是,该脚本会将每条记录追加到同一个文件中。他们似乎没有提供“出口记录”(单数),所以我不知道如何实现这一点。
任何帮助将不胜感激。
答
我能够找到一个解决方案:
Find All Go to Record/Request/Page [First] Loop Omit Find Omitted Set Field ["HTML File Name","External("DM-Export", KeyField & ".html")"] Export Records [Restore] Find All Go to Record/Request/Page [Exit After Last, Next] End Loop
按步骤7: http://help.filemaker.com/app/answers/detail/a_id/3438/kw/exporting%20found%20set
答
FileMaker的“导出记录”脚本一步总是出口整个发现集。您必须遍历找到的集合,并在导出之前一次隔离一条记录:
Go to Record/Request/Page [First]
Loop
Set Variable[$path; Value:Get(FilePath) & "/../somefolder" & MyTable1::my_field_1]
New Window
Show All
Omit Record
Show Omitted
Export Records [No dialog; "$path"; Unicode(UTF-8)]
Close Window
Go to Record/Request/Page [Exit After Last, Next]
End Loop