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



Mar 7, 2012, 10:19 PM
47 Posts

view datasource search using string including quotes

  • Category: Server Side JavaScript
  • Platform: Linux
  • Release: 8.5.2
  • Role: Developer
  • Tags: quote string view search
  • Replies: 2
 HI all,
 
I am having an issue with a view datasource which I need to search in a field for a string which includes quote characters. The field values through which I am searching are typically something like this 
 
<part code="10">part name</part> 
 
i am trying to search for the code="xx" portion. I have tried escaping the quotes in the search string as per  
 
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Searching_for_Documents 
 
without luck. I have tried wildcards too, both single character (?) and multi(*). The search string looks like this: 
 
[fieldname]="code=\"10\""
 
and the backslashes are properly escaped on the SSJS side (i.e. var queryString = "[fieldname]=\"code=\\\"10\\\"";) If I search for just the number ([fieldname]="10") the results are as expected with current test values, but I expect that if the code number happened to be a substring of the part name for an otherwise not matching string, I would get incorrect results.
 
Can anyone offer any insight? 
 
Thanks, 
 
Rich 
 
 
Mar 8, 2012, 7:12 PM
129 Posts
Re: view datasource search using string including quotes
Looks like you can achieve this with curly braces.
 
E.g. [field={my monitor is 24"}] 
 
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/8fb465467a99f13d8525746d006c2ccf?OpenDocument 
Mar 9, 2012, 8:22 PM
47 Posts
Re: view datasource search using string including quotes
 No, curly braces don't work, in fact they break the search in that it no longer restricts to matches to the field, finding documents where the search string occurs in any field.
 
Rich 

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