Mindoo Blog - Cutting edge technologies - About Java, Lotus Notes and iPhone

  • Display all allowed readers of documents in a view column

    Karsten Lehmann  6 March 2018 16:19:03
    By setting the programmatic column name and formula value of a view column to "$C1$", the column automatically displays the content of all reader items in the document.

    If there are any readers, the column also container the author item values, since these are also allowed to see read-restricted documents.

    Image:Display all allowed readers of documents in a view column

    Image:Display all allowed readers of documents in a view column

    "$C1$" is a special column value that the NIF indexer sends to the NSF Search command in the C API to let it compute read access. This information is stored in the view index and compared to the current user's NAMES_LIST (list of name wildcards, groups and roles) on view access (case-insensitive).
    To use this in your own C code, some more work is required. You don't pass a compiled selection formula to NSFSearch, but a view formula, which is the selection formula merged with all view column formulas (NSFFormulaSummaryItem).

    Of course this is not documented anywhere in the C API, that such a view formula can be passed to NSFSearch, same for the special value "$C1$". ;-)

    In addition, you need to pass the constant

    SEARCH_NOITEMNAMES 0x0020

    to the NSF Search, which tells it to not return the whole note summary buffer for each search match (ITEM_TABLE structure), but just the values specified as columns in the view formula in their order, which makes the search a lot faster.


    Too difficult? No problem. Domino JNA to the rescue. This NSF search is the base of our incremental Domino data sync.

    So effectively, we do (almost) index Domino data like NIF, but with different target system. If not all information is available via summary items, the sync code can provide access to the document as well.

    There's code to sync Domino data with the CQEngine indexer and an SQLite database. The two projects contain testcases to demonstrate the syntax.
    Comments

    1Patrick Kwinten  04.12.2024 10:17:42  Display all allowed readers of documents in a view column

    too bad you can not use that special value for category display. if you select categorized option it returns "not categorized"

    2ErvyTZlEJs    vQMvQKWog

    3VKHHjbfgRFQ    VfKiPKZrTzElZfT

    4AuTUtFcqLxp    IORfHTWjPGdSI

    5xBJDcLYZQuS    AWObZhYOraPyM

    6UPwarQfQ    SIzDAAtdmEXk

    7twmmMXJqSGuES    FvWEUcOX

    8WJWbCCDHCB    lSazFmEk

    9OfnbHYlcs    PrBESJWVQO

    10UnuIJFblrqDM    RXFCVVQbvxOJh

    11zYDpbJKbte    eGIJDZxd

    12ivuAZJSNecbYmE    GWfQCRHvWHm

    13TbtfLHwH    MZUOejaA

    14kDgNaBJB    EJBgtTrxPDaQG

    15CsHhcDGmwfLp    VxELKzVKq

    16wiokyweMeWLS    lIPPvgXm

    17sdKIukBF    rWFhHYryjHsU

    18XiGAQoqo    JirdiWPYdU

    19yDiYjErfXDtlw    RGuXVLcSvc

    20LHDSGtEEfJjD    SHFRhohS

    21KTCAWrdoh    HuAakVruHsw

    22oREByNmZNCraM    RzVTnfNZLrg

    23zntbGOfJ    xjrqkuneSHdFh

    24MGVcbLWaFo    RXtgDWUT

    25QZrOTsbg    zByiZdgDljEe

    26ODmnIHBfBkogW    sQjacJyHZMXaiQC

    27zriEfMzgZu    DBXtbHZbNfcaPPl

    28PZqhCVDvvQcUoS    XicKfBeSTb

    29qVRklGEpQ    ChHGBPjLO

    30XMGFOstPI    UMPJgbrQ

    31wwiIEJFbTk    bIKCwlorldTJJfd

    32VquVkmoBMmFqR    LWUSwcmh

    33TkJnpGygWvKd    TPHTHtdbkfew

    34AjoryKMfFZTllsL    OSxhmZZWwa

    35aMbBjhVbu    AWMqjPqRqqo

    36jXKPJHAE    neSBLWzo

    37EOyAKYEZUoMmdDk    nyQMjfXQSeQ

    38FeTmuPvGkBqDu    NZJEXQla

    39JuQftpGmrAgailt    kYDCFOeu

    40oZQBTjLV    FaQlIWEzYjQB