Normal Topic Searching Q&A for long lines (Read 1136 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Searching Q&A for long lines
Oct 24th, 2006 at 6:18pm
Print Post Print Post  
This programmed retrieve works in Sesame:
Code
Select All
{ @len(Desc_Line_4) > 78 } 


It retrieves all records where the number of characters stored in element Desc_Line_4 is greater than 78.

However, I can't get it to work in Q&A 5.0, which is where my data is really currently stored.  I'm not too familiar with programmed retrieves in Q&A, and very unfamiliar with the @len command.  Can someone give me a boost?  Thanks in advance.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Searching Q&A for long lines
Reply #1 - Oct 24th, 2006 at 6:52pm
Print Post Print Post  
When you say that it is not working in Q&A, do you mean that it is not returning the correct results, or that it is giving you a syntax error? If it is a syntax error, try placing a "#1" in the Desc_Line_4 feild in the retrieve spec, and placing
"{ @len(#1) > 78 }" in a different field. That will remove a field naming problem from the equation.

If it is not giving you the results you expect (as opposed to a syntax error), you will have to supply more info.

I just tried the basics of this, both with a field name and with field numbering in a simple Q&A database here, with no problems.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Searching Q&A for long lines
Reply #2 - Oct 24th, 2006 at 6:56pm
Print Post Print Post  
Thanks Mark.  It was a syntax error, with the cursor highlighting the field name.  I checked it many times and I know I was spelling it right, but the spec just didn't like it.  Putting #1 in the field and pointing the programming at it worked like a charm!
  

**
Captain Infinity
Back to top
IP Logged