Masking fields
jeffb_r4
Member Posts: 34
Hi all.
I have a situation where we have item numbers like so.
12-34-5678.
The customer would like them stored in the database as 12345678, but displayed (on item cards, invoices, etc.) as 12-34-5678, if possible.
If necessary, they could be displayed internally as 12345678 but show up on invoices as 12-34-5678.
I have been told that this can't be done.
Does anybody disagree, and if so, how can it be done?
Thanks.
I have a situation where we have item numbers like so.
12-34-5678.
The customer would like them stored in the database as 12345678, but displayed (on item cards, invoices, etc.) as 12-34-5678, if possible.
If necessary, they could be displayed internally as 12345678 but show up on invoices as 12-34-5678.
I have been told that this can't be done.
Does anybody disagree, and if so, how can it be done?
Thanks.
0
Comments
-
Technically the request could be implemented. E.g. you could create a new field in all involved tables for the separated item no. this field could automatically be filled when the "real" item no. will be validated. in all reports and form you could display the new no without changing the real posting-functionality.
However, you would have to customize many tables, forms and reports, thus the effort is absolutely not small.0 -
we do this exact thing, using the no2 field in the item table
it stores the stripped number, we have a part for example 5-4-37
it is stored in the no2 field as 5437
then I can put the appropriate field on the reports that need it.
We also set up an item cross refernce for both numbers
5437 and 5-4-37 so that we can look up the part using either number on sales orders, purchase orders ect. so we enter the cross reference field on the sales order and it brings up the appopriate part number
I added a key to the item table for the no2 field. so user can set there own preference on how they look up numbers, on the item list if they like to use the no2 field sort by that and can quickly search on it. and other who like the whole number can use the regular no. field.
In our case, we print out the whole part number, so we didn't change any reports, and no special programming was needed. since the no2 field is a standard field, just doesn't show up on the form by default.0 -
We use No.2 too - even have the AltSearchField of the "No." field in the item table changed to No. 2 so we could enter either one in orders.0
-
Thanks for the suggestions.
In using the No2 field, does that mean whenever you set up a new item, you need to enter the No, the No2 and the cross-reference, or do you have some way of automating this?0 -
If you have access to cal code in tables or forms you can set code to create the concentrated no2 field.jeffb_r4 wrote:Thanks for the suggestions.
In using the No2 field, does that mean whenever you set up a new item, you need to enter the No, the No2 and the cross-reference, or do you have some way of automating this?
I don't have access to the cal code on tables or forms, so I use a non-printing report that filters on the item table and a blank no2 field. it runs and creates the cross references, and another report creates the no2 field. I run it from the job scheduler. so users think it is automatic.
you can use something like this to strip the characters you don't want out
STR:=DELCHR(Item.no,'=','/','-');
other users here can probably give you the exact code to use.0 -
If it will always be all Numbers else you can add the alphabet

OnInsert or the item table"No. 2" := DELCHR("No.",'=',DELCHR("No.",'=',0123456789));or"No. 2" := DELCHR("No.",'=','-');
Also to auto add into a different table. This is how we add UPC Codes scanned into the item card to an associated table called AltUPC table Using INSERT.IF AltUPC.FIND('-') THEN AltUPC."Item No." := "No."; AltUPC.Description := Description; AltUPC."Description 2" := "Description 2"; AltUPC."Item UPC/EAN Number" := "Item UPC/EAN Number"; AltUPC."Date Entered" := WORKDATE; AltUPC.INSERT;
In your case you will fill in the fields needed in the Cross Reference Table and put the code on the OnValidate of the item table.0
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
- 323 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