Search on Integer value

ravi_navision
Member Posts: 102
Hi Experts,
RandomNumber is a custom field and stores integer value.
How can I search on RandonNumber field.
Values in RandomNumber field
1000
1001
2001
1100
I want to search by 10* (field filter).Is it possible?
Result should be
1000
1001
Thanks,
ravi
RandomNumber is a custom field and stores integer value.
How can I search on RandonNumber field.
Values in RandomNumber field
1000
1001
2001
1100
I want to search by 10* (field filter).Is it possible?
Result should be
1000
1001
Thanks,
ravi
~~ravi
0
Comments
-
Hi,
Set the filter to 1000..1099 -will be a problem if you have 10000 as well.0 -
Set the filter to 1000..1099 -will be a problem if you have 10000 as well
Hi DaveT,
Thanks for your response. Here I have pasted some values for example.
Actually the data is
1000
1001
10000
10101
1005
1080
…..etc~~ravi0 -
The problem here is, that you use only Numbers in a Code field. so these field is a alphanumeric field with alpha numeric sort order. so, on SQL, not native (NAtive do it wrong) the integer sort is not "correct" (for alpha sort it is).
So, to handle these problems fill the numbers before with 0000 (Null) or a letter like A0001000,A00010001,A00010002, etc
If you can't Rename the Numbers, and you need the sort order only in a Report you can store the datas in a temporary table and run through this table in the report or fill a a separate field (like "No. 2") with 0000001,0001000, etc. To switch the order (integer sort) you select the key "No. 2"
RegardsDo you make it right, it works too!0 -
Hi Garak,
It is an integer field (not a code field). And I am trying to do a filter on the list form~~ravi0 -
May be best is to create new field of type code which will be filled in OnValidate of the integer field by the text representation of the integer. In this way you will be able to filter over this code field in a way you want...0
-
ravi_navision wrote:Hi Experts,
RandomNumber is a custom field and stores integer value.
How can I search on RandonNumber field.
Values in RandomNumber field
1000
1001
2001
1100
I want to search by 10* (field filter).Is it possible?
Result should be
1000
1001
Thanks,
ravi
The issue is conceptual not actual. You are confusing the word "integer" as a concept and "Integer" as a type of field. In your case you seem to be conceptualizing a code such as a telephone number (telephone number are not integers) with a true integer.
You need to look at the design of your database and rethink it. Kamil's suggestion of creating a Code field in parallel is possibly the only "short term hack" available to you in this case. But better would be a conceptual rethink of what you are doing.David Singleton0 -
Sorry David Singleton, if I confused you.
Well, I hope Kine understood the issue better.
Thanks to all~~ravi0 -
Report level u can do something like this maybe!!!
YourNos:
1000
1001
10000
10101
1005
1080
…..etc
OnAftergetrecord()
EVALUATE(text1,YourNos));
text2:=copystr(tex,1,2);
if text2<>'10' then
CurrReport.Skip;
I don know how this will help thou!!!!
Good luck0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions