Set Caption
nikeman77
Member Posts: 517
Hi guys,
How do i set caption of the field based on location code given that we have different countries with each countries had their own location code.
thus my field caption would like to name after those location code
eg: China: Singapore, Location Code: SH, GZ, BJ
Table:
SH QTY | GZ QTY | BJ QTY
878 | 10,913| 9807
How do i set caption of the field based on location code given that we have different countries with each countries had their own location code.
thus my field caption would like to name after those location code
eg: China: Singapore, Location Code: SH, GZ, BJ
Table:
SH QTY | GZ QTY | BJ QTY
878 | 10,913| 9807
0
Comments
-
Can you use the Matrix-form in NAV?0
-
Edit form of your choice, select a random label, call properties, select captionclass, press F1.0
-
hi sog,
thanks for replying.. i try not to modify anything in the codeunit 10 -
there is no need to modify Codeunit 1. Add a function, and use the captionclass.Microsoft Certified IT Professional for Microsoft Dynamics NAV
Just a happy frood who knows where his towel is0 -
hi dans,
much appreciate your reply..
i used a function to return code of location:
so in my table field
Eg: Location1, caption class i place: GetName(1)
Location2, caption class i place: GetName(2)
Result? When I run my table... the field caption is missing?!
Below is my GetName function
GetName(LocationNumber)Text:30
Location.SetRange(Code);
Location.Next(LocationNumber);
Exit(Location.Code);0 -
It's better to use variables as captionclass.
And don't forget to call currform.updatecontrols.
(And F1 is the helpfunction, not codeunit 1)0 -
Sog wrote:It's better to use variables as captionclass.
And don't forget to call currform.updatecontrols.
(And F1 is the helpfunction, not codeunit 1)
Wouldn't it be great if all new developers found out about the F1 key. [-o<David Singleton0 -
Cause F1 is help in most programsDavid Singleton wrote:Wouldn't it be great if all new developers PC users found out about the F1 key. [-o<
0 -
Sog wrote:
Cause F1 is help in most programsDavid Singleton wrote:Wouldn't it be great if all new developers PC users found out about the F1 key. [-o<
I ran a Developer training course last week. I made very sure that the students pressed F1 at every possible opportunity. The developer online help in Navision is very good, and could probably answer half the questions that people post on MiBuSo. I just can't understand why developers are so afraid to hit that button.David Singleton0 -
Microsoft should just include the question about F1 key on the developer exam, and survey how many people have no idea about F1 key.
Microsoft Certified IT Professional for Microsoft Dynamics NAV
Just a happy frood who knows where his towel is0 -
hi guys,
thanks for replying i will try it out. sorry to sounds so stupid.
i had used the F1 key in caption class which it says below:
TranslateCaptionClass(Language : Integer; CaptionClass : Text[80]) : Text[80]
case Language of
1036 :
case CaptionClass of
'DIM1' : EXIT('Projet');
'DIM2' : EXIT('Département');
end;
1033 :
case CaptionClass of
'DIM1' : EXIT('Project');
'DIM2' : EXIT('Department');
end;
end;
EXIT('');
if there isnt any modification of the above codes, guess my understanding is it returns a blank.
i tried suggested methods using variables:
Location[1] in my caption class properties too, i still turns out blank.
sorry that it triggers annoyance to you guys.
0 -
Well.. it's true that it's a bit hard to understand the concept of CaptionClass in the beginning. You need to take a look at Codeunit 1 to understand it.
I normally modify codeunit 1 to set the caption. If you do not want to modify the codeunit 1, there is another way to do it. Try putting this on the CaptionClass : '1,5,,' + txtCaptionMicrosoft Certified IT Professional for Microsoft Dynamics NAV
Just a happy frood who knows where his towel is0 -
hi dans,
as suggest, i modified my caption class to: '1,5,,'+codelocation[1]
in my table, i have a function setLocation()
intI:=1;
Location.SETRANGE(Code);
IF g_Location.FINDSET THEN BEGIN
REPEAT
codeLocation[intI] := Location.Code;
intI +=1;
UNTIL Location.NEXT=0;
END;
When I run my report to insert sales, purchase history, i add following on report-initreport
ItemHistory.setLocation();
after report complete its running, i open up my table, the caption is blank.. :roll:0 -
This is code that has to run on a form.
If you want to change the caption of a label in a report, use a textbox instead and place the preferred caption in it.
Captionclass is used in runtime on a form/page
, not on a report, table, ... . Which means init form, run function, open form, see correct caption.NAV Help wrote:Applies To
Forms
Pages
Next time, read the help, don't skip to the part where you think the problem is.0 -
hi sog,
noted..will go try it out..thanks a lot..
0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
