changing code field

Koen_Roggeman
Member Posts: 17
Hello,
Is it possible in Navision Financials to do something like find and replace in excel with the first two characters from a code field.
For example:
KR/0004
has to become
PL/0004 when a condition is true.
thx for the help.
Is it possible in Navision Financials to do something like find and replace in excel with the first two characters from a code field.
For example:
KR/0004
has to become
PL/0004 when a condition is true.
thx for the help.
0
Comments
-
Hi,
Yes, it is doable through little programming. First, create a new temporary field and copy the value of the current field into it, you could write a routine to do this, they create another routine to
record.setrange(<Temporary field>,'KR/004');
if record.find('-') then begin
repeat
if record.<fieldname> = true then begin
record.<Original field> := 'PL/004';
record.modify;
end;
until record.next - 0;
end;
This should do what you are trying to do.
Regards
Suresh.0 -
Hello,
Thx for answering my question but I think I wasn't clear enough.
When a condition is true, I just want to chang the first two character of the field. The number has to be exactly the same.
It's not just one number I have to change, it can be all kinds of numbers.
thx0 -
Hi,
Maybe I am missing something, but could you not filter your records on the 'condition' in some way and just use the standard Navision 'Find & Replace'?
I tried the following - I added a code field of 10 characters to the Customer table, and populated it with the word 'FROG'.
I then ran the table, did a CTRL + F to bring up the find tool, & pressed the 'Replace' button. In the 'Find What' field I put 'FR' and in 'Replace With' I put 'D' and hit 'Replace All'.
This changed all instances of FROG to DOG, leaving 'OG' unchanged.
Sorry if I am missing something...Edward Bloomfield
Lead Consultant
Theta0
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