- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个 Lotus 脚本,可以将组织 docID 添加到 contactDoc 并且它工作正常,但我想在 java 脚本中实现此目的
Sub AddContactID(contact As NotesDocument, organisation As NotesDocument)
contact.TmpIDString = organisation.DocID(0)
Dim tmp As Variant
tmp = |@SetField("ContactOrganisationIDs";@Trim(@Unique(ContactOrganisationIDs:TmpIDString)))|
Dim flag As Variant
flag = Evaluate(tmp,contact)
Dim Item As NotesItem
Set Item = contact.GetFirstItem("TmpIDString")
If Not (Item Is Nothing) Then
Call Item.Remove
End If
End Sub
反转功能:
Sub RemoveOrganisationIDByID(contactDocId As String, organisation As NotesDocument)
Dim Session As New NotesSession
Dim CurrDb As NotesDatabase
Set CurrDb = Session.CurrentDatabase
Dim contact As NotesDocument
Set contact = CurrDb.GetDocumentByUNID(contactDocId)
If contact Is Nothing Then Exit Sub
If organisation Is Nothing Then Exit Sub
Dim ContactOrganisationIDs As Variant
ContactOrganisationIDs = contact.ContactOrganisationIDs
pos = ArrayGetIndex(ContactOrganisationIDs, organisation.DocID(0))
If Not IsNull(pos) Then
ContactOrganisationIDs(pos) = ""
Call contact.ReplaceItemValue("ContactOrganisationIDs",FullTrim(ContactOrganisationIDs))
Call contact.Save(True, False)
End If
End Sub
最佳答案
下面的 SSJS 函数应该可以做到这一点
function addContactID(contact, organisation) {
contact.replaceItemValue("TmpIDString", organisation.getItemValueString("DocID"));
session.evaluate('FIELD ContactOrganisationIDs := @Trim(@Unique(ContactOrganisationIDs:TmpIDString)); FIELD TmpIDString := @DeleteField; ""', contact);
}
参数contact
和organization
必须是NotesDocument
类型。调用该函数后,不要忘记保存联系文档。
关于java - 如何使用 Java 脚本将 docID 从一个 NotesDocument 添加到另一个 NotesDocument,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29874970/
我正在尝试从 Lucene 的文档字段中获取所有名为 Terms 的术语和相关帖子(即如何计算 Lucene 中的术语频率?)。根据documentation有一种方法可以做到这一点: 公共(publ
嗨 如果lucene索引上只发生插入操作(没有删除/更新),那么docID是否真的没有改变?而且它也可靠 如果这是真的,我想用它来增量加载 FieldCache 以降低加载所有文档的开销,最好的解决方
我正在索引 Lucene.Net 数据库中的一行数据。一行相当于文档。 我想用 DocId 更新我的数据库,以便我可以在结果中使用 DocId 以便能够快速检索行。 我目前首先从结果文档中检索 PK,
我有一个简单的查询,可以在帖子相关帖子下推荐用户。 await this.$fireStore.collection('posts') .limit(6).where('tags', 'array-c
请找到我的代码片段。 @RequestMapping(value="/abc" , Method=RequetMethod.GET) public void xxx(@Requestparam
我想知道如何限制一组文档中的查询搜索。到目前为止,我能够将搜索中的文档列表输出到数组(或文本文件)。我想搜索其他术语,但限制此文档列表中的结果。 考虑到我是一个java新手,请在你的回答中进行描述。我
我有这样一段文字: .I 1 .T experimental investigation of the aerodynamics of a wing in a slipstream . .A bren
我正在将 dtSearch 与 SQL 数据库结合使用,并希望维护一个包含所有 DocId 及其相关文件名的表。从那里,我将添加一个包含我的外键的列,以允许我结合文本和数据库搜索。 我有代码可以简单地
我有一个 Lotus 脚本,可以将组织 docID 添加到 contactDoc 并且它工作正常,但我想在 java 脚本中实现此目的 Sub AddContactID(contact As Note
我正在使用新发布的 Lucene 4,并且我了解到与文档术语向量相关的 API 发生了很大变化。我已经通读了迁移文档和相关的各种博客邮件列表帖子,并且我相信我正确使用了 API。但是,我总是从 Ind
我是一名优秀的程序员,十分优秀!