If you want to use customized captions on a field, mostly you change Codeunit 1 to do it. I found a way to use customized captions without changing Codeunit 1.
In the CaptionClass Property you have to put '1,5,,' + txtMyCaption. Or you can also put a function that returns the string.
Some explanation:
The first parameter says it is a dimension
The second parameter says to use a certain format (= optional parameter 1 + dimension caption + optional parameter 2) of the dimension-code (not value-code!) put in parameter 3.
The third parameter is the dimension-code you want. This parameter must contain a value that does not exist in the dimensions (a blank for example). If this dimension does not exists, codeunit 1 shows the fourth parameter on the caption.
The fourth parameter : the value you want to show as caption.
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
0
Comments
'3,new caption'
and ctrl-f8 worked.
In the form it was more variable.
In the data properties of a field set it to '3,' + txtMyCaption
In the OnInit of the form do:
txtMyCaption := 'New caption';
and ctrl-f8 still uses the old caption, but for me this was good enough, thx
Nav 5.0. SP1
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
If I modify this in the CaptionClass property of the field on the table...
then I have even stranger things...
A first look shows me that nothing changed... but when I do a Zoom on the form (CTRL+F8 ) and I choose to show columns field & fieldname.
Field is blank and fieldname contains "inventory"
Strange, strange,... ](*,)
Everytime you change '1,5,,' + YourVariable's value !
I was fumbling on this and it just didn't seem to work until I finally tried UPDATECONTROLS.
Thank you kriki
6.0 SP1 - still works for classic!
small example is below
made small list form to show dynamic caption fo Net Weight as "1 <base unit of measure> of <description> will weight" and values is lower:
NB! take into account of limit of result caption length of 80!