f



Sorting Numbers in a Text Field

One field in my database contains the dosage of medicines. It's a text
field since I have to include the units. 

Here's a list of what might be in the field:

10 mg
20 mg
50 mg
100 mg

When I sort I want them to appear as I listed them above. However, they
appear as
10 mg
100 mg
20  mg
50 mg

Any suggestions for solving this problem?

Rich
0
6/29/2004 10:01:00 AM
comp.databases.filemaker 11053 articles. 0 followers. amosw01 (46) is leader. Post Follow

2 Replies
555 Views

Similar Articles

[PageSpeed] 21

This question has been answered multi times before. You have entered the
numbers in a text field so they are sorted on their ascii value and not on
their numeric value. Put the numbers in a number field, leave the mg part
out (since it is always mg you can just put a textbox (tag behind the field)
and you can safely sort

-- 

Keep Well,
VintageUrsus


"Rich Sagall" <rich.sagall@pobox.com> schreef in bericht
news:1gg4ohg.16yxqdyw92kawN%rich.sagall@pobox.com...
> One field in my database contains the dosage of medicines. It's a text
> field since I have to include the units.
>
> Here's a list of what might be in the field:
>
> 10 mg
> 20 mg
> 50 mg
> 100 mg
>
> When I sort I want them to appear as I listed them above. However, they
> appear as
> 10 mg
> 100 mg
> 20  mg
> 50 mg
>
> Any suggestions for solving this problem?
>
> Rich


0
Ursus
6/29/2004 10:40:42 AM
On Tue, 29 Jun 2004 10:01:00 GMT, Rich Sagall told us that:

> One field in my database contains the dosage of medicines. It's a text
> field since I have to include the units. 
> 
> Here's a list of what might be in the field:
> 
> 10 mg
> 20 mg
> 50 mg
> 100 mg
> 
> When I sort I want them to appear as I listed them above. However, they
> appear as
> 10 mg
> 100 mg
> 20  mg
> 50 mg
> 
> Any suggestions for solving this problem?
> 
> Rich

Hi Rich,

make a second field, calculation : TextToNum(dosage) and sort on that field
in stead. 

Peter
0
Peter
6/29/2004 11:19:15 AM
Reply: