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



May 2, 2013, 5:10 PM
453 Posts

Re: Search In view Results

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: search in view results
  • Replies: 11
Boy do I feel dumb, I had been working on a DB that was full text indexed, switched DB and the new one was not.

The code:

"FIELD ACCurrentApprovers CONTAINS " + session.getCommonUserName()

does not throw an error and seems to do the selection correctly except the names in ACCurrentApprovers are in the format CN=SomeName/O=SomeOrg. I substituted getUserName() and I get the error that the query is not understandable. Tried @UserName() with the same result. From the documentation that I have seen both should just return a String value in the form CN=SomeName/O=SomeOrg. Am I missing something?

I changed the code to:

var us:String = session.getUserName()
"FIELD ACCurrentApprovers CONTAINS " + session.getCommonUserName()

this does not throw an error but gives the wrong results, then I changed it to

var us:String = session.getUserName()
"FIELD ACCurrentApprovers CONTAINS " + us
 

and I get the error query is not understandable.  

I put the code session.getUserName() in a computed field in the pagerTop and it displays the full users name correctly so it does not appear to be an issue with session.getUserName in a Data View. This process is really getting "not understandable"

Thanks for the help. 
May 6, 2013, 12:00 PM
4 Posts
Print statement to admin console?
Are you able to insert a print statement to check the search queries that these code statements evaluate to? I tend to rely on that pretty heavily so I can see what's really going on. That, and trying the resulting search query in Notes. The idea of putting the username in quotes also sounds promising. "FIELD ACCurrentApprovers CONTAINS \"" + us + "\""

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