Normal Topic Retrieving numbers (Read 1034 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Retrieving numbers
Feb 28th, 2007 at 7:00am
Print Post Print Post  
Hi -

I have a layout element that is bound to type "number."

The element contains aparment #s such as 112, 113, 2100, 4103, 4104, etc.

I want to retireve all the apartments that start with the number 41.  If I enter 41.. ALL records are returned.  The only way I can retrieve what I want is to specify each and every number starting with 41, such as 4101; 4102; 4121; 4122 etc.  This is very cumbersome and I don't understand it.

Am I missing something or is there a problem retrieving numbers?

Thanks for your help.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Retrieving numbers
Reply #1 - Feb 28th, 2007 at 10:38am
Print Post Print Post  
I had the same problem, so I changed from a NUMBER field to a TEXT field and was then able to retrieve using 217..
This just retrieves all numbers beginning 217

Don
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Retrieving numbers
Reply #2 - Feb 28th, 2007 at 12:54pm
Print Post Print Post  
As with Q&A, the .. wildcard behaves differently depending on field type. In a number field, .. is a range operator.  When you use 41.. in a number field, you are essentially asking for "41 and higher".

In your case, to find the numbers in the 41 range, try something like
4100..4199

If you are looking for something like 410, 4105 and 41807, use the "treat as text" operator which is a close square brace ( ] ):
]41..
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Retrieving numbers
Reply #3 - Feb 28th, 2007 at 1:02pm
Print Post Print Post  
I can change mine back to number instead of text.

Thanks for the lesson, as usual it works perfectly.

Don Smiley
  
Back to top
 
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: Retrieving numbers
Reply #4 - Mar 6th, 2007 at 10:22pm
Print Post Print Post  
I would suggest using a TEXT field for apartment numbers, telephone numbers, etc, and often also for inventory numbers and the like. Use Number data type when you want to ...

* Perform arithmetic on the values, or
* Sort by number, so 19 comes between 5 and 25

.. otherwise use text type. Using text allows you to add alpha characters such as 114A or 212-4568, and to perform simple text searches as is required here, eg:
41.. to retrieve  410, 4125, 4174 etc.
  

Alec
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Retrieving numbers
Reply #5 - May 28th, 2007 at 2:50pm
Print Post Print Post  
Hi -

In my case, I need to sort by the apartment number, so it is not practical to use a text field.  Erika, your response has provided the information I needed for my searches.  (Thanks)

Now, however, I am having another problem with number retrieval.  One of my numeric fields is on a tab page.  For some reason the Universal Search (which works fine on the tab page for text fields) does not seem to work on number fields.  (I even tried using the close square brace, just in case, but that didn't help)

Once again, I am asking whether this is a problem and, if so, will it be "corrected" in the upcoming new release  ....   or am I simply overlooking something?

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Retrieving numbers
Reply #6 - May 28th, 2007 at 3:02pm
Print Post Print Post  
Universal Search only searches in Text fields.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Retrieving numbers
Reply #7 - May 28th, 2007 at 3:10pm
Print Post Print Post  
Durn!

Cry

Any chance that could ever be changed, to include other field types?

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Retrieving numbers
Reply #8 - May 28th, 2007 at 3:14pm
Print Post Print Post  
SpencerWulwick wrote on May 28th, 2007 at 3:10pm:
Any chance that could ever be changed, to include other field types?


Sure. It's something we can take a look at.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged