FileMaker - 如何在屏幕上列出不同的值?

发布于 2024-12-28 17:52:16 字数 233 浏览 4 评论 0原文

我希望在另一个字段中列出重复字段的不同值(在浏览模式下)。情况如下:

我有一个包含国家/地区名称的字段。该字段中的国家/地区名称可能会重复,因此当使用“列表”功能时,我会得到类似“法国、法国、法国、德国、德国、匈牙利”的内容。 如何创建一个字段来列出我的国家/地区字段中的所有值,但将其分组为“法国、德国、匈牙利”?

如果我可以直接使用 SQL 查询来干扰 FileMaker 数据库,我将使用 GROUP BY 语句。

I would like to have the distinct values of a repeating field listed in another field (in browse mode). The case is as follows:

I have a field that contains country names. The country names in this field may repeat themselves, thus when using the "List" function I get something like "France, France, France, Germany, Germany, Hungary".
How can I create a field that lists all the values from my country field, but has it grouped as "France, Germany, Hungary"?

In the case I could directly use a SQL query to interfere with the FileMaker databse I would use the GROUP BY statement.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

有深☉意 2025-01-04 17:52:16

要对每条记录中的所有值进行汇总,请执行以下操作:

  1. 创建一个标记为“国家/地区”的新值列表(文件菜单 > 管理 > 值列表)
  2. 创建值列表“使用字段中的值”并指定重复

  3. 创建一个新的计算字段“列出的国家/地区”
  4. 将计算设置为键入“文本”并使用以下代码:

    ValueListItems ( Get(FileName) ; "Countries" )

如果您想查找仅当前记录的值:

  1. 创建同一基表的新表出现次数“NewTO”,并通过唯一索引链接两个记录。
  2. 更改“国家/地区”值列表,以便它从“NewTO”和重复字段获取值。
  3. 选择“仅包含从以下位置开始的相关值”并选择原始表出现次数。

如果您希望列表随着重复字段值的更改而更新,请确保不存储该字段的计算结果。

To make a summary of all the values across every record, do as follows:

  1. Make a new value list labeled 'Countries' (File Menu > Manage > Value Lists)
  2. Make the value list 'Use Values From Field' and specify your repeating field
  3. Create a new Calculation field, 'Listed Countries'
  4. Set the calculation to type 'Text' and with the following code:

    ValueListItems ( Get(FileName) ; "Countries" )

If you'd like to find the value for only the current record:

  1. Make a new Table Occurrence, 'NewTO' of the same base table and link the two records by a unique index.
  2. Change the 'Countries' value list so that it obtains values from 'NewTO' and your repeating field.
  3. Select 'Only include related values starting from' and select your original Table Occurrence

If you'd like the list to update as the repeating field value changes, make certain that you Do Not Store Calculation Results for the field.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文