Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8870995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:52:12+00:00 2026-06-14T17:52:12+00:00

I have the following code which I have in the Bind data part of

  • 0

I have the following code which I have in the Bind data part of a repeat control. I have called the Collection Name ‘docs’. I cannot seem to make any values appear in the view control. Computed Field – docs.getItemValue(“Status”). Any ideas where I’m going wrong?

var v:NotesView = database.getView("xpageReports");
viewScope.status=""

// Created After
var after = viewScope.crafter
if(after==null)after = @Date(2000, 1, 1, 0, 0, 0);  

// Created Before
var before = viewScope.crbefore 
if(before==null) before = @Date( @Tomorrow() );

// Build Date Range
var dr = session.createDateRange(after, before);

// Status
var status = viewScope.crstatus;
if(status =="-select-") status =""
// Department
var department = viewScope.crdepartment;
if(department =="-select-") department=""

// Unit
var unit = viewScope.crunit;
if(unit ="-select-") unit=""

var dc:NotesDocumentCollection = v.getAllDocumentsByKey(dr);
if (dc.getCount() == 0) {
    viewScope.status = "0";
    return;
}

var count = 0
var doc:NotesDocument = dc.getFirstDocument();
while (doc != null) {
    var tmpdoc = dc.getNextDocument();
    var remove = 0

    @If(status!="",@If(doc.getItemValueString("Status")!=status,remove = remove + 1,""),"")
    @If(department!="",@If(doc.getItemValueString("Department")!=department,remove = remove + 1,""),"")
    @If(unit!="",@If(doc.getItemValueString("Unit")!=unit,remove = remove + 1,""),"")
    if(remove!=0) dc.deleteDocument(doc)

    doc.recycle();


    doc = tmpdoc;

    }

return dc
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:52:13+00:00Added an answer on June 14, 2026 at 5:52 pm

    I changed the code to return the noteIDs of the documents and placed this inside the Bind Data section of the repeat control, and set the Collection Name to docs

    var v:NotesView = database.getView("xpageReports");
    var docIDs = ""
    
    // Created After
    var after = viewScope.crafter
    if(after==null)after = @Date(2000, 1, 1, 0, 0, 0);  
    
    // Created Before
    var before = viewScope.crbefore 
    if(before==null) before = @Date( @Tomorrow() );
    
    // Build Date Range
    var dr = session.createDateRange(after, before);
    
    // Status
    var status = viewScope.crstatus;
    if(status =="-select-") status =""
    // Department
    var department = viewScope.crdepartment;
    if(department =="-select-") department=""
    
    // Unit
    var unit = viewScope.crunit;
    if(unit =="-select-") unit=""
    
    var dc:NotesDocumentCollection = v.getAllDocumentsByKey(dr);
    if (dc.getCount() == 0) {
        return;
    }
    
    var count = 0
    var doc:NotesDocument = dc.getFirstDocument();
    while (doc != null) {
        var tmpdoc = dc.getNextDocument();
        var remove = 0
    
        @If(status!="",@If(doc.getItemValueString("Status")!=status,remove = remove + 1,""),"")
        @If(department!="",@If(doc.getItemValueString("Department")!=department,remove = remove + 1,""),"")
        @If(unit!="",@If(doc.getItemValueString("Unit")!=unit,remove = remove + 1,""),"")
        if(remove==0) docIDs = docIDs = docIDs + doc.getNoteID()+";"
    
        doc.recycle();
        doc = tmpdoc;
    
    }
    return @Explode(docIDs,";")
    

    Then I placed a panel inside the repeat control, set the data source to the form of the documents and set the Document ID field to computed and entered docs. Now any computed fields I put inside the panel can be bound to the form field

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code which should bind some data to a gridview but
I have the following code which definitely returns a proper data result if I
We have an attribute called DateReleased for which the following Data Annotation attributes are
I have the following PHP code, which is meant to insert data in the
I have DataTable which brings me following data from database. Name Address CountryID I
I have following code which works for radio buttons but need to be changed
I want to know is below code correct ? I have following code which
I have the following code which is working, I was wondering if this can
I have the following code which is used to upload large files (~6MB) to
i have the following code which switches some fullscreen-background-images (fadeOut, fadeIn). setInterval(function() { var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.