Show Fileld as Label (not as Textbox)

Hello All,

I have added one more field on Item Card page. The field is declared as TEXT in GLOBAL C/AL.

In the page load event I have done some calculation and show it on page.

On page it is coming as TEXTBOX, whereas I want to show that field as LABEL.

Please help!

Regards

You cannot dynamically assign any values to a label, a label is like a text-constant.

On the other hand - does it any mater whether your label is a text-box or a label?

Hi Asim,

Anfinnur is right, but what you CAN DO is to create it as a text-box and just change all the properties of the text box so that it will look exactly like a label. The users will not be able to see the difference.

Create a label and just set the same properties (like border, background etc.) to the text-box.

This is actually not entirely true.
I don’t know if it works with pages, but on regular forms it’s possible by using the CaptionClass property, and a little modification in CU1.

CaptionClass is a comma-seperated string, that is passed to CU1 and interpreted.
Dimension-fields use this functionality, as the caption of those fields are retrieved from actual fields in table 348

[:$] That’s right - forgot the CaptionClass utility.

CaptionClass used like this is not seen often.
I’ve practically never seen it used for other purposes than dim-fields.

Personally i’ve only used it once, cuz i definately would go for Anfinnur and Erik’s suggestion abt. using a text-box first, as it calls for less modification.

Hi Erik,

Can you please tell me from where to set that property.

I am using NAV 2009 classic client and I want to show it on PAGE.

Regards.