带有名称而不是 ID 的下拉菜单

发布于 2024-12-21 05:09:54 字数 200 浏览 4 评论 0原文

在此处输入图像描述

在文件生成器中,我尝试将一条记录与另一条记录相关联。它必须有一个与之关联的 ID。

您可以在下拉列表中显示 ID 和名称,但该字段实际上必须是 ID。有没有办法在字段中显示名称和 ID,或者我必须有另一个文本框在其旁边显示名称?谢谢。

enter image description here

In file maker I'm trying to relate a record to another record. It has to have an ID associated it.

You can display the ID and name in the drop down but the field actually has to be an ID. Is there a way display the name and ID in the field, or will I have to have another text box showing the name next to it? Thanks.

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

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

发布评论

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

评论(4

邮友 2024-12-28 05:09:54

使用弹出菜单而不是下拉列表,并且仅显示值列表定义中右侧的值。这将隐藏 ID 以便显示,但仍会将字段值设置为 ID 而不是名称。

Use a Pop-up Menu instead of a Dropdown List, and only display values from the right side in your value list definition. This will hide the IDs for display purposes, but will still set the field value to an ID instead of the name.

羁绊已千年 2024-12-28 05:09:54

该字段本身仅显示 ID,因此您需要在其旁边添加另一个字段。另一个想法是使用不可编辑的计算或包含显示 ID 和名称的合并字段的文本来覆盖此字段。这样,该字段仍然可编辑,但一旦退出,您将在 ID 旁边看到名称。

The field itself will only display an ID, so you need to add another field next to it. Another idea is to cover this field with a non-editable calculation or a text with merged fields that shows both the ID and name. This way the field will still be editable but once you exit it, you'll see the name next to the ID.

私野 2024-12-28 05:09:54

我承认,使用弹出菜单而不是下拉菜单是最简单的解决方案。我还承认,有时下拉菜单更适合用户界面。

在这些情况下,我显示了带有名称的菜单,并使用 ExecuteSQL 语句来查找适当的 ID 并在适当的位置填写它。然而,这确实假设这些值是唯一的,这通常是一个很好的假设。

I'll admit, using a popup menu instead of a drop down menu is the easiest solution. I'll also admit that there have been times when drop down is more appropriate to the UI.

In those cases I've shown a menu with the name and used an ExecuteSQL statement to find the appropriate ID and fill it in where appropriate. This does assume that the values are unique, however, which is usually a pretty good assumption.

不交电费瞎发啥光 2024-12-28 05:09:54

在这种情况下我所做的是拥有两个字段;一个是下拉菜单,另一个是按照通常的做法存储第二列数据。大多数教程将一个堆叠在另一个之上,在顶部字段(即非下拉字段)的浏览模式下不允许输入,因此允许用户单击下拉列表进行选择并存储生成的第二列信息在可见字段中,投递箱 ID 存储在后面。

然而,随着 Web Direct 等的出现,此方法失败了,因为 Web Direct 无法处理堆叠实体,因此我采用的一个非常简单的解决方案是将两个字段并排,右侧的下拉菜单和编辑框(或左侧第二个字段信息)。下拉菜单启用了下拉箭头,然后下拉菜单的宽度仅显示下拉箭头。然后将其与编辑框的右侧边缘对齐(对接)。结果是用户单击下拉箭头,下拉框打开,并且启用下拉框的所有功能,用户选择他们想要的内容,下拉框关闭回到箭头,信息存储在第二个框中。

(这种方法的优点在于,整个布局看起来就像一个标准的下拉菜单,但它是两个字段。抱歉无法发布图像,因为它会使其更清晰)

What I do in this instance is have the two fields; one a drop down and the other to store the second column data as is the usual practice. Most tutorials stack one on top of the other with entry not allowed in browse mode of the top field (which is the non drop down field) thus allowing a user to click on the drop down make a selection and the resultant second column info is stored in the visible field and the drop box id is stored behind.

However with the advent of Web Direct etc this method fails as web direct is unable to handle stacked entities so a very simple solution I employ is to have the two fields side by side, the drop down on the right, and the edit box (or second field info) on the left. The drop down has a drop down arrow enabled and then the drop down has a width that only shows the drop arrow. This is then aligned next to (butted up) against the right hand edge of the edit box. The result is the user clicks on the drop arrow the drop box opens and all functionality of the drop box is enabled and the user selects what they want and the drop box closes back down to the arrow and the information is stored in the secondnd box.

(The beauty of this method is that the whole layout looks just like a standard drop down yet it is two fields. Sorry cant post an image as it would make it clearer)

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