仅在FileMaker 18中从当前记录导出/导入日期到当前记录 [英] Export and Import date from/into current record only in FileMaker 18

查看:112
本文介绍了仅在FileMaker 18中从当前记录导出/导入日期到当前记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个FileMaker 18数据库,该数据库与外部软件对接.为此,我需要执行以下操作,但无法弄清楚:

I have a FileMaker 18 database that interfaces with an external software. To do so, I need to do the following and can't figure it out:

  1. 从当前活动记录(仅该记录)中导出所选数据
  2. 将与当前记录相关的数据导入到多个表中

在用户界面中,我有两个按钮,一个用于导出,一个用于导入.我不知道的是:

In the UI I have two buttons, one to export, one to import. What I can't figure out is:

  • 如何仅导出当前记录,而不导出其他记录? (我设法导出了,但是导出了表中的所有数据)
  • 如何让脚本将数据导入到多个表(3个不同的表)中,使它们彼此正确关联(一个是主表,另一个与它相关,1:n关系),然后关联主表记录我将其导入到的当前活动记录中?

(问题的第二部分在此处分解为更多详细信息:将复杂的XML数据导入到多个FileMaker表中)

(second part of the question split off with more details here: importing complex XML data into multiple FileMaker tables)

推荐答案

要仅导出当前记录,请首先选择show all records命令,然后选择omit record命令,然后选择show missing only命令,最后选择一个记录. .可以编写脚本.

To export the current record only, first choose the show all records command and then the omit record command and then the show omitted only command and finally export the one record. This can be scripted.

要导入到多个表中,请确保您具有要导入到子表中的主键,并且在关系图中已建立关系.对每个表进行一次导入.

To import into several tables, make sure you have a primary key that you import into the child tables and that your relations are set up in the relationship graph. Do one import for each table.

澄清后进行更新:

好吧,看来您必须执行2或3次导入,具体取决于您拥有多少个数据点表.全部可以在1个脚本中完成.根据您的描述,您似乎将需要3个(或2个)表,一个用于外部主表,两个(或1个)数据点.如果您要导入的主表中只有1条记录,则此过程将起作用.

Ok, looks like you have to do 2 or 3 imports, depending on how many data point tables you have. This can all be done in 1 script. Looks like you will need 3 (or 2) tables, one for the external main and 2 (or 1) for the datapoints as far as I understand from your description. This procedure will work if you only have 1 record in the main table you're importing, as you say you do.

步骤:

  1. 将主表导入具有自动功能的合适表中 输入主键.设置一个变量以保存生成的主键 导入后.
  2. 将每个辅助记录导入到它们的 各自的表.这些表需要有一个可用于 与步骤1中的表中的主键相关的外键. a导入后替换这些记录上的字段内容以填充 在第1点设置了变量的外键字段.
  3. 回到主表中,将当前记录的外键字段设置为在步骤1中设置的变量.
  1. Import the main table into a suitable table that has an auto enter primary key. Set a variable to hold the primary key generated after import.
  2. Import each of the secondary records into their respective tables. These tables need to have a field available for the foreign key that relates to the primary key in the table in step 1. Do a Replace Field Contents on these records after import to populate the foreign key fields with the variable set in point 1.
  3. Back in your main table, set the foreign key field for the current record to the variable set in step 1.

确保关系图中的所有这些表都正确相关.这应该做到.

Make sure all these tables are related properly in the relationship graph. This should do it.

这篇关于仅在FileMaker 18中从当前记录导出/导入日期到当前记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆