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



Apr 4, 2011, 11:19 AM
2 Posts

Displaying NotesDocument values in an XPage

  • Category: Other
  • Platform: Not Applicable
  • Release: 8.5.2
  • Role: Developer
  • Tags: Display,unsaved documents
  • Replies: 1
 
 DATA SOURCES
I have two data sources specified for an XPage
 
1) Is a saved document which I specify by DocumentuniqueID and use the action open with - "masterdoc"
2) One is the current document which is being created but which has not yet been saved - "document1"
 
XPAGE COMPUTED FIELDS 
I place a computed text field on the XPage to try and read the NotesDocuments sources above and then display the value these documents hold
 
The computed fields have the following javascript in it
 

var s = masterdoc.getValue("Fieldname");

if(s == null) {

return "No values unsaved"

} else {

return s.toString()

}

The  first computed field refers to the first source and the second to the second source 
RESULTS 
When I specifý masterdoc as my document source then I get a value for my computed field
When I specify document1 for my document source I get "No values unsaved" 
QUESTION
1) Is it possible to display the UIDoc values of computed fields from  a Notes Document that has not been saved yet?
 
 

 
 
 
 
Apr 4, 2011, 6:32 PM
22 Posts
Re: Displaying NotesDocument values in an XPage
The XPages concept of a UIDoc is the XSP document with its components and controls. So you can use getComponent('computedField1').getValue() to ge tthe value of a computed field.
 
Newbs

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