내가 같은 내부 도메인 내에서 최근 연락처보기에서 중복 된 항목을 찾기위한 코드를 작성해야 볼 수 있습니다. 나는 외부 인터넷 접촉을 만지지 않을거야. 거기에 어떤 특별한 속성이나 방법 (연꽃 스크립트에서?) 서버 냅과 모든보기 항목을 비교하는 것이 좋은 생각입니까? 누구든지이 일을하는 가장 좋은 방법을 제안 할 수 있습니까? 내가 충분히 얻을 경우찾기 중복 연락처
0
A
답변
1
확실하지 당신이 필요하지만, 여기에 내가 제안 무엇 무엇
내가보기 (최근 연락처)를 통해 걸어 코드의 작은 무리를 작성하고 목록을 작성 만의 고유 거기에 넣어 제안한 쌍의 키/의사와 다른 장소에 모든 사본을 저장하십시오.
당신은 코드 에이전트를 만들 수 있습니다즉
Dim session As New NotesSession
Dim view As NotesView
Dim doc As NotesDocument
Dim uniquedocs List As Variant
Dim duplicates As string
Dim key As String
Set view = session.Currentdatabase.Getview("(Recent Contacts)")
Set doc = view.Getfirstdocument()
While Not doc Is Nothing
' this is the unique key, please change it if you need
key = doc.Getitemvalue("MailDomain")(0)
If key <> "" Then
If Not IsElement(uniquedocs(key)) Then
Set uniquedocs(key) = doc
Else
If duplicates <> "" Then duplicates = duplicates & " | "
duplicates = duplicates & key
End If
End If
Set doc = view.Getnextdocument(doc)
Wend
MsgBox duplicates
중복 (I, 그래서 그냥 고유 키가 당신을 위해 무엇을 필드 정의, 잘못된 키를 사용할 수 있습니다,주의하시기 바랍니다 것은) - 모든 메일 문자열입니다 있는 MsgBox 오류() & ""& ERL() 종료 하위 끝 숨보기에 적어도 2 개 접점 (최근 연락처)
0
Sub Initialize
On Error GoTo errHandler
Dim session As New NotesSession
Dim db As NotesDatabase
Dim currdb As NotesDatabase
Dim view As NotesView
Dim view1 As NotesView
Dim vc As NotesViewEntryCollection
Dim namesentry As NotesViewEntry
Dim serdoc As NotesDocument
Dim localdoc As NotesDocument
Dim item As NotesItem
Dim dname As String
Dim serverfullName() As String
Dim localfulName As String
Dim formula As String
Dim result As Variant
Dim count As Integer
'Getting all the documents from servers NAB ,put that in document collection
Set db=session.GetDatabase("Myserver","names.nsf")
Set view=db.GetView("People")
Set vc = view.AllEntries
Set namesentry = vc.Getfirstentry()
ReDim Serverfullname(CInt(vc.Count))
count = 0
'storing fullnames in array
While Not namesentry Is Nothing
Set serdoc = namesentry.Document
serverfullName(count) = serdoc.Getitemvalue("FullName")(0)
Set namesentry = vc.Getnextentry(namesentry)
count = count + 1
Wend
'keeping the string format for Comparison
Dim x As String
Dim iteration As Integer
x = ""
iteration = 0
ForAll i In Serverfullname
iteration = iteration + 1
If i ="" Then
ElseIf count = iteration Then
x = x + |"| + i + |"|
Else
x = x + |"| + i + |"| + ":"
End If
End ForAll
'MsgBox x 'Displaying servers fullname list
'Geetting local NAB contacts
Set currdb= session.CurrentDatabase
Dim selFormula As String
'creating New view to filter documents with same domain
selFormula= {SELECT @UpperCase($AutoCreatedList) = "DIP" & @LowerCase(MailDomain)[email protected]("mydomain")}
Call currdb.Createview("RecentView",selFormula)
Set view1 = currdb.GetView("RecentView")
Set localdoc = view1.GetFirstDocument
While Not localdoc Is Nothing
localfulName = localdoc.Getitemvalue("FullName")(0)
Dim indexresult As Variant
Dim Formula1 As String
Formula1 = |@Contains(| & x & |;"| + Localfulname + |")|
'MsgBox Formula1
indexresult = Evaluate(Formula1)
If indexresult(0)= 0 Then
MsgBox " Duplicate entry " & localfulname & "."
'Call localdoc.Remove(true)
End If
Set localdoc = view1.Getnextdocument(localdoc)
Wend
Exit sub
errHandler이 도메인 b
관련 문제
- 1. 중복 찾기
- 2. 중복 파티션을 사용하여 중복 찾기
- 3. Android 연락처 검색어 중복 됨
- 4. 주어진 URL 찾기 연락처 링크
- 5. Android - 표시 이름으로 연락처 찾기
- 6. 연락처 즐겨 찾기 검색 창
- 7. 중복 찾기 및 표시
- 8. 배열에서 중복 찾기
- 9. 중복 항목 찾기 SQL
- 10. 중복 찾기 SQL
- 11. 찾기 중복 주문은
- 12. 찾기 중복 행
- 13. 중복 이름 찾기 sql
- 14. 중복 서적 찾기
- 15. BODI에서 중복 레코드 찾기
- 16. SQL, xQuery : 중복 찾기
- 17. 중복 배열 요소 찾기
- 18. 찾기 절단 가능한 중복
- 19. 중복 항목 찾기 C#
- 20. 컬렉션에서 중복 항목 찾기
- 21. 컬렉션에서 중복 찾기
- 22. 연락처 응용 프로그램에서 연락처 주위를 돌아 다니는 이미지 찾기
- 23. 연락처 : 중복 된 전화 번호 선택을 제거합니다.
- 24. ArrayList의 중복 값 인덱스 찾기
- 25. Google 사이트 맵에서 중복 찾기
- 26. MySQL - 중복 된 튜플 찾기
- 27. Perl File :: 중복 이름 찾기
- 28. SQL - 중복 된 항목 찾기
- 29. 다중 열 중복 찾기 mysql
- 30. 연관 배열, 중복 값 찾기
명확하게 내 요구 사항을 말해 보겠습니다. 로컬 names.nsf에서 모든 항목을 가져와야합니다. 각 문서 (연락처)를 서버와 비교해야합니다. NAB, 존재하지 않는 경우 해당 연락처를 삭제해야합니다. 지역 NAMES.NSF – Mythli
에서 문서는 내가 서버 NAB의 "사람"보기에서 전체 이름 값을 얻을 문자열 배열에 저장되며, 다음과 같이 먼저 코드를 시도했다. 이렇게하는 것이 가장 좋은 방법입니까? 는 내가 그렇게 난에서 제거 것이다 중복되는 false를 반환하는 경우 는 루프 내에서 내가 전체 이름 의 서버 배열 (최근 연락처보기에서) 전체 이름 각 연락처를 비교합니다, 지역 NAB에서 모든 항목을 얻을 것이다 로컬 nab. – Mythli
예, 당신이 쓴 것은 옳습니다. 나는 당신이 쓴 것과 똑같이 할 것입니다. –