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



Jul 11, 2012, 9:22 AM
1 Posts

@Subset

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: Rich Text
  • Replies: 1
Sorry - this may be simple but I am new to this....I am customising the Team Room app.
 
I have a homepage x-page that I want to take some content from the Body of a document in the database.
 
I want to use the top document in a view - so use a calculated value in the data section to lookup the DocID
 
@DbLookup(@DbName(),"By Category","Homepage","MainID") 
 
This works great when I have one doc in the category but when there are more than one the above returns multiple docIDs so fails - I have tried the following - but this does not work.... 

@Subset(@DbLookup(@DbName(),"By Category","Homepage","MainID"),1)

 
Can anyone explain why as it appears to evaluate to the correct value 

Sep 10, 2012, 3:08 PM
26 Posts
Re: @Subset
you can use Getalldocsbykey method instead. which will returns all the category related document and then get first document from it.
Same methods are available for xpages as in Notes.

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