Domino uses recursive algorithms to get view values

Source: Internet
Author: User

in a relational database, there are two fields that are parent-child relationships. With the recursive algorithm, enter a parent ID to get all the corresponding child IDs. This data structure is often used in the organization architecture. The display generally uses a tree-shaped structure. In Domino the same can handle this situation, below is a small demo, I hope to be helpful to everyone. Communication QQ 873968102

1) View of the data structure (this data structure is used in some applications where this is the foreground UI xpages Domino Dynamic Edit tree)

2) The following is a recursive algorithm that uses LS to bring out all the child IDs by entering a parent ID. By: Delimited, other Java, Ssjs writing similar, do not write out.

Some students want to. Why get all the sub-IDs? For example, to delete an ID, first get the child ID together. Then the current ID and child ID are all deleted.


%rem    View First second column recursive data    view,id to global variable%end Remdim ID asstringfunction tempstring1 (key as String) asstring    Dim VC1 Asnotesviewentrycollection    Dim entry1 as Notesviewentry    Set Vc1=view. Getallentriesbykey (key,true)    Set entry1=vc1. Getfirstentry While not       entry1 are nothing       If id= "" Then          id=cstr (Entry1. Columnvalues (1))       Else           id=id & ":" & CStr (Entry1. Columnvalues (1))       EndIf       tempstring1=id & ":" &tempstring1 (CStr (entry1. Columnvalues (1)))       Setentry1=vc1. Getnextentry (entry1)    wend  endfunction


Domino uses recursive algorithms to get view values

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.