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



Oct 14, 2011, 6:49 AM
5 Posts

'viewEntry.getColumnValue()' is null error message when trying to compute column content on an XPage with view source; also causing a run time error HERE IN THIS FORUM WHEN SEARCHING FOR

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer,Administrator
  • Tags: viewEntry SSJA Errors
  • Replies: 1
 
 
Hello Everybody,
 
I'm attempting to compute in a column of a view control following:
 
prod = viewEntry.getColumnValue("$41").toString();
return prod;
 
and I'm getting when viewing the "view XPage" in browser or client this error:
 
####################################
The runtime has encountered an unexpected error.

Error source

Page Name:/posByStatusMobile.xsp
Control Id: viewColumn6

Exception

Error while executing JavaScript computed expression
Script interpreter error, line=1, col=40: 'viewEntry.getColumnValue()' is null

JavaScript code

   1: prod = viewEntry.getColumnValue("$41").toString();
   2: return prod;
######################################################
 
I made sure that the view is attached as data source to the view control and that the column "$41" exists. They do. In fact I would like to implement this view as one-column overview with more lines about a product - separated by newlines - in every cell. These lines/values should come from different view columns and aggregated in this computed xPage column value, and the fact that this simple computation with one single column in the source view does not work is really annoying. 
 
Any idea what to do here instead ?  Or would you please correct me if I did something wrong ?
 
Many thanks in advance,
 
Ionut
 
 
 
#########################################################################
BTW. when I'm searching for "viewEntry not found" - without quotes - IN THIS FORUM - I get this error:
 

Unexpected runtime error

The runtime has encountered an unexpected error.

Error source

Page Name:/allDocuments.xsp
Control Id: computedField2

Exception

Error while executing JavaScript computed expression
Script interpreter error, line=1, col=39: Error calling method 'getRowCount()' on java class 'com.ibm.xsp.component.xp.XspDataIterator'
Notes error: Query is not understandable

JavaScript code

   1: return "("+getComponent("repeatList").getRowCount()+" total)";
Stack Trace
###################################################################################
 
I leave to the  appreciation of the XPages inventors and builders how encouraging this in a forum built in this technology can be ...
 
 
Oct 15, 2011, 6:58 PM
272 Posts
Re: 'viewEntry.getColumnValue()' is null error message when trying to compute column conte...
Hi,
 
the best way is to to a try/catch - block around your code and see what happens then... ;-)
 
This would also fix the damn bug in this forum (the query string is not handled correctly, as described in my postings here)
 
Sven

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