Home
Extended ECM
API, SDK, REST and Web Services
Ampersands in input string query
Neil_Sampson
I'm on a customer site at the moment and trying to write a LiveReport which validates a user input string against a particular attribute's string value. The attribute in question is a text popup and is in a category which has been in the system for a while and therefore has a large number of documents associated with it. Unfortunately during the initial creation of this attribute years ago, the customer has got several values in the text popup which contain ampersands (eg 'Health&Safety').So, the user enters a string and the report pulls back those records which match that string (the report does several other things as well, otherwise we would be using search functionality). The report works fine on regular values, but when trying to search on something with an ampersand it returns no rows (when it should actually return more than 1).On running the report directly the input label is set to something like this:Health+%26+SafetyI've got the report fired from a webform criteria page, so if needed I could amend the string being passed to a LiveReport friendly format. I've tried running the livereport directly and doing various ORACLE tricks to counteract the ampersand - all of which work when fired at the DB directly via SQL Plus but none of which work when fired via LiveReport.Has anyone come across this / got a workaround?
Find more posts tagged with
Comments
Bhupinder_Singh
Message from Bhupinder Singh <
bsingh@opentext.com
> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">eLink
Just a thought:
Have you tried using && (double ampersand) when running the query from the LiveReport?
- Bhupinder
From:
eLink Discussion: Livelink LiveReports Discussion [mailto:livereportsdiscussion@elinkkc.opentext.com]
Sent:
Thursday, August 03, 2006 11:53 AM
To:
eLink Recipient
Subject:
Ampersands in input string query
Ampersands in input string query
Posted by
nsampson
(Sampson, Neil) on 08/03/2006 11:51 AM
I'm on a customer site at the moment and trying to write a LiveReport which validates a user input string against a particular attribute's string value.
The attribute in question is a text popup and is in a category which has been in the system for a while and therefore has a large number of documents associated with it. Unfortunately during the initial creation of this attribute years ago, the customer has got several values in the text popup which contain ampersands (eg 'Health&Safety').
So, the user enters a string and the report pulls back those records which match that string (the report does several other things as well, otherwise we would be using search functionality). The report works fine on regular values, but when trying to search on something with an ampersand it returns no rows (when it should actually return more than 1).
On running the report directly the input label is set to something like this:
Health+%26+Safety
I've got the report fired from a webform criteria page, so if needed I could amend the string being passed to a LiveReport friendly format.
I've tried running the livereport directly and doing various ORACLE tricks to counteract the ampersand - all of which work when fired at the DB directly via SQL Plus but none of which work when fired via LiveReport.
Has anyone come across this / got a workaround?
Lindsay_Davies
Message from Lindsay Davies via eLinkHi Neil,You did not mention whether this is Oracle or SQL server.I'd suggest you double up the ampersand.It is probably being treated as a variable delimiter.RegardsLindsayOT UKSupport-----Original Message-----From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: 03 August 2006 16:54To: eLink RecipientSubject: Ampersands in input string queryAmpersands in input string queryPosted by Sampson, Neil on 08/03/2006 11:51 AMI'm on a customer site at the moment and trying to write a LiveReportwhich validates a user input string against a particular attribute'sstring value. The attribute in question is a text popup and is in a category which hasbeen in the system for a while and therefore has a large number ofdocuments associated with it. Unfortunately during the initial creationof this attribute years ago, the customer has got several values in thetext popup which contain ampersands (eg 'Health&Safety').So, the user enters a string and the report pulls back those recordswhich match that string (the report does several other things as well,otherwise we would be using search functionality). The report worksfine on regular values, but when trying to search on something with anampersand it returns no rows (when it should actually return more than1).On running the report directly the input label is set to something likethis:Health+%26+SafetyI've got the report fired from a webform criteria page, so if needed Icould amend the string being passed to a LiveReport friendly format. I've tried running the livereport directly and doing various ORACLEtricks to counteract the ampersand - all of which work when fired at theDB directly via SQL Plus but none of which work when fired viaLiveReport.Has anyone come across this / got a workaround?[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Livelink LiveReports Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/2249677Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.livereportsdiscussion@elinkkc.opentext.com.