We help IT Professionals succeed at work.

Find Duplicates

Arunkumar
Arunkumar asked
on
503 Views
Last Modified: 2013-12-18
Fairly simple.  

Just laziness though.  I have a list and I would like to have another list derived from this that would list only the duplicate items....

Anything is fine.  @Functions / LotusScript I dont care.

:-)
Arun.

Example:

SourceList : one , two, three, four, one, one, two, five ,  six , seven

ResultList : one, one, two
Comment
Watch Question

Commented:
Dim alreadyFound List as Integer
Set onlyDups = doc.replaceItemValue "onlyDups" , "Ignore first element - just a header"
Forall element in doc.FieldWithDups
   If IsElement(alreadyFound(element)) Then
     onlyDups.appendToTextList element
   Else
     alreadyFound(element) = True
   End If
End Forall

Author

Commented:
That was good.... Qwaletee. Now add 50 pts to the question and answer this one....

Dim stTimeRange As NotesDateTime
      Dim edTimeRange As NotesDateTime
      Dim sysTime As NotesDateTime
      
      Set stTimeRange = New NotesDateTime("11/06/2003 07:00:00")
      Set edTimeRange = New NotesDateTime("11/06/2003 18:00:00")
      Set sysTime = New NotesDateTime("11/06/2003 10:00:00")
      
      Print "Start Time " & stTimeRange.TimeOnly
      Print "End Time " & edTimeRange.TimeOnly
      Print "CurrentTime " & sysTime.TimeOnly
      
      
      If (systime.TimeOnly > stTimeRange.TimeOnly) And (systime.TimeOnly < edTimeRange.TimeOnly) Then
            Print "The currentTime is falling in work hours."
      Else
            Print "The Time is beyond work hours"
      End If

Why does this always say not in range ?  Can you fix this one for me..??

Author

Commented:
I just gave you a bunch of pts on an old question.  Lets keep the point saga going....
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
1) You're comparing strings
2) Could be a timezone-problem, you didn't include your timezone in the NotesDateTime-calls

Author

Commented:
Well, i just got around with it by adding Hour before all the time variants....and i am about to test it now.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
@Sort was introduced with R6, in which case you may as well use the looping mechanism.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Sure, I know, and n cannot be generated automatically. Nevertheless, the thing works, and without explicit looping instructions, for that's what's so charming about lists in Notes. You could even write it as a one-liner, making it unreadable, almost like APL but then the other way around.

Commented:
Wow!  APL!  that would easily generate N: ~i 10

Author

Commented:
Hey guys here is a continuation question. i will increase the pts accordingly while grading...

I have a customer running 5.08 and are experiencing a intermittent problem within one group of the organization.  The problem is that on random, so they say, messages, that if the user forwards the message or if they reply to all with history the message is blank except for the new text that has been written.

I looked on ldd and saw quite a bit of this, but it all related to messages
within the iNotes environment.

Any thoughts ?

Commented:
Any possibility someone likes to use "hide when copying" or "prevent copying."

And of course, you are trying to confuse everyone by having two completely different questions here!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.