Lotus Notes 自定义搜索
我对莲花笔记很陌生。这一切都将在客户端完成。我需要编写一个自定义搜索来搜索特定表单。这是字段的示例:
FormName = MyForm1 数据库字段称为Name1、Name2、Name3 数据库字段为department1、deparment2、department3、department 4。
搜索表单只有2 个字段。姓名和部门。我需要发生以下情况,名称搜索字段需要搜索所有 3 个名称字段,部门字段需要搜索所有 4 个部门字段。
感谢您的帮助。
I am very new to lotus notes. This will all be done on the client. I need to write a custom search that will search a particular form. This an example of the fields:
FormName = MyForm1
database fields are called Name1, Name2, Name3
datasbase fields are department1, deparment2, department3, department 4.
The search form will only have 2 fields. Name and Department. I need the following to happen, The name search field needs to seach all 3 name fields, the department field needs to search all 4 department fields.
Thank you for your assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这在一定程度上取决于您需要搜索的模糊程度。您是在这些字段中搜索完全匹配还是部分匹配?
假设完全匹配,您只需要一个在多个名称字段和多个部门字段中查找匹配的公式。我们将搜索查询字段称为 NameQuery 和 DepartmentQuery。然后,您可以构建此公式,如果在名称字段之一中找到 NameQuery 中的值,并且在部门字段之一中找到 DepartmentQuery 中的值,则该公式将返回 true。
如果您需要搜索部分匹配,则可以使用 @LIKE 公式。首先,使用 @IMPLODE 将名称和部门字段值连接成单个字符串。然后您可以进行通配符匹配。请注意,这不是很有效,因此如果您正在处理数以万计的文档,您可能需要找到更好的解决方案。
It depends a bit on exactly how fuzzy you need your search to be. Are you searching for an exact match, or for a partial match in those fields?
Assuming the exact match, you just need a formula that looks in the multiple name fields, and multiple department fields for a match. Let's call the search query fields NameQuery and DepartmentQuery. Then you could construct this formula which would return true if the value in NameQuery is found within one of the name fields, and the value in DepartmentQuery is found in one of the department fields.
If instead you need to search for a partial match, you could use the @LIKE formula. First, concatenate the name and department field values into a single string using @IMPLODE. You can then do a wildcard match. This isn't very efficient, mind you, so if you're working on tens of thousands of documents you might want to find a better solution.
迈克——
毫无疑问,内置搜索将非常适合您!
以下是步骤...
- 构建新表单(即“MyForm”)来保存您的数据;
- 构建您的视图,将数据显示为列;
- 将视图的“表单公式”设置为“MyForm”(带引号)
- 确保视图的“搜索栏”已启用;
- 输入要搜索的值;
- 结果显示出来了,很好!
这应该有帮助...
Mike --
The built-in search will work fine for you, no doubt!
Here are the steps...
- Build your new form (ie, "MyForm" ) to hold your data;
- Build your view, to display your data as columns;
- Set your view's "Form Formula" to "MyForm" (with quotes)
- Make sure the "search bar", is enabled, for the view;
- Enter the values to search for;
- The results are displayed, nicely!
That should help...