unique entries in a variant

Posted on 2009-02-12
Last Modified: 2013-12-18
Is there a way to leverage variants to deal with unique data? Example: If I pull the dept names for a list of people, but only only want to store each dept name once. Currently my code sorts the data and does compares of the current Dept  to the last one used.
Question by:BillTr
    LVL 17

    Expert Comment

    what language are you using? can you just do @unique(deptnames) ?
    LVL 46

    Assisted Solution

    by:Sjef Bosman
    Or, 100% equivalent to theprevious post, but in LotusScript:
          v= Eval("@Unique(deptnames)",doc)
          v= Eval(|@Unique("| & (Join(deptnames,|":"|) & |")|)
    depending on where the values are.
    LVL 13

    Accepted Solution

    Ehhh Sjef, is there anything wrong with ArrayUnique(sourceArray [,compMethod ])?
    (nothing personal, buddy!)
    LVL 46

    Expert Comment

    by:Sjef Bosman
    Ehm, well, now, right, oooops... Just wanted to show that "clever" things can be done using Eval()... Not so clever after all, apparently...

    Is there a backdoor in this room??

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now