Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Repeat Control array as data source
Feedback Type: Question
Product Area: Notes Client
Technical Area: Application Development
Platform: Windows
Release: 8.5.1
Reproducible: Not applicable

I want to use an array created by javascript as the data source for a repeat control and then use a computed field inside the repeat control to show the values from the array on the xPage. I have not been able to do it. Here is what I have tried so far.

For the iteration formula for the repeat control I put the code below in the JSS script editor to create the array as the data source

var x = new Array("test1","test2","test3");
x

I put a computed field inside the repeat control with the formula below in the Javascript editor for the field value. The collection name of the repeat control is rowData and the index is rowIndex

rowData(rowIndex).getValue()

Viewing the web page in the notes client I get the error "Error calling method 'rowData(number)' on an object of type 'object [JavaScript Object]'

I realize the formula for the computed field is not right. Sorry for my ignorance but I have looked all over this forum and the web and I am not able to understand what I should do to get the value from the array, thanks for any help.

Background as to why I need an array and can not use a view etc.
Although the data for each row comes from documents in a database the order they have to be displayed on the xPage can not be taken from the order of documents in a view or document collection. For example data for row one of my table on the xPage may come from document one and row two from document two, to get the data for row three I may have to go back to document one again. To solve this part I create my array by getting a document collection and storing all the values from all the documents in an array, then manipulating the array with Javascript to get the array in the order I need to display on the xPage.


Feedback number WEBB8CSRK2 created by ~John Nonjipyskiynds on 01/04/2011

Status: Open
Comments:

Repeat Control array as data source... (~John Nonjipysk... 4.Jan.11)
. . Solved (~John Nonjipysk... 4.Jan.11)
. . just use the collection name (~Yoshi Zekponel... 27.Jan.11)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS