Hard to tell without seeing the whole XML doc, but don't you need to wrap % 
signs on both sides?

I.e.:
'XML Data' LIKE "%<COMMENTS>%"

Another option might be to do a substring match and then test the result.

-Patrick


|  -----Original Message-----
|  From: Action Request System discussion list(ARSList)
|  [mailto:[email protected]] On Behalf Of Rick Westbrock
|  Sent: May 1, 2013 02:41 PM
|  To: [email protected]
|  Subject: LIKE operation on a display-only character field is failing
|  
|  Listers-
|  
|  For some reason I am having a very tough time with an active link
|  qualification. I am using a display-only form with display fields to parse
|  the contents of an XML data file into discreet fields to push to a regular
|  form. The basic process is to use the XML tags to isolate the data in each
|  element and do a set fields to a display field on the form, then strip the
|  XML element (tags and data) from the front of the string and proceed to the
|  next element. I am walking a table to loop through all the elements.
|  
|  My problem is that any given record in the XML data may have zero to many
|  Comments. There is an opening tag <COMMENTS> that will show there is at
|  least one comment but if there are no comments then it will have a
|  <COMMENTS/> tag instead. I have an active link that looks at the string and
|  decides whether or not to call the guide for parsing out the comments but
|  the qualification is not working at all.
|  
|  I first tried to test for the existence of the opening tag with this
|  qualification where XML Data is the character field (size 0) that holds the
|  contents of the XML file: 'XML Data' LIKE "<COMMENTS>%"
|  
|  However even when I can see that a previous active link set fields has set
|  the XML Data field to a string that starts with <COMMENTS> this
|  qualification fails. I tried to go the other way by using 'XML Data' LIKE
|  "<COMMENTS/>%" (the tag which indicates no comments are present) and NOT
|  'XML Data' LIKE "<COMMENTS>%" but no matter what I try the qualification
|  always fails.
|  
|  Am I missing something obvious about the way a LIKE operation works on a
|  character field in an active link? I found documentation that it may not
|  work properly when comparing to the database value of an unlimited character
|  field but this is just a display field on a display-only staging form. Any
|  suggestions would be greatly appreciated. Below is a screen shot of the data
|  field at the time the qualification is evaluated:
|  
|  
|  
|  AR 7.6.04 SP2, custom application
|  Windows Server 2008
|  MS-SQL Server 2008
|  
|  -Rick
|  
|  ___________________________
|  Rick Westbrock
|  QMX Support Services
|  
|  
|  
|  ____________________________________________________________________________
|  ___
|  UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers
|  Are, and have been for 20 years"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to