首页 文章

将找到的每个记录集导出到单个文件?

提问于
浏览
0

这看起来像是一个简单的操作,但我似乎无法让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

但是,此脚本会将每条记录附加到同一文件中 . 他们似乎没有提供“出口记录”(单数),所以我不确定如何做到这一点 .

任何帮助将不胜感激 .

2 回答

  • 1

    我找到了一个解决方案:

    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

  • 1

    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
    

相关问题