Caption label in a Form

AlkroAlkro Member Posts: 115
In a Tabular Form, Label in a TextBox is Description, but i want when an user open this Form the label change to Fails.

I test this and put code in OnOpenForm:

http://www.mibuso.com/forum/viewtopic.php?t=6746

but caption shows empty...

Regards

Comments

  • JedrzejTJedrzejT Member Posts: 267
    Hi,

    I use this solution (without changing CU 1 and code on form) - this is the same what Kriki write in Your link. Maybe real example helps You.

    Set:
    In Table In field property CaptionClass = '1,5,,' + CaptionClass(5)
    - 5 is ID of this field.

    In Table function CaptionClass

    CaptionClass(FldNo : Integer) : Text[30]

    CaptionSetup.SETRANGE(CaptionSetup."Table field no.",FldNo);
    IF CaptionSetup.FIND('-') THEN
    EXIT(CaptionSetup.Description)
    ELSE
    EXIT('');

    This solution allow user to change caption by this second table CaptionSetup (FldNo,Description). This one change description of field on every form.

    Regards
  • DaveTDaveT Member Posts: 1,039
    I tried '1,5,,'+... on version 5.0 and its does work. The later post of '3,'+... works fine. Check that is set in the captionclass property of the field and not the caption. Also if the caption is coming out blank may sure to set the text variable (if you're using one) in the oninit trigger
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.