Field is not highlighted

fahdfahd Member Posts: 226
Dear Experts,

In LS Retail> POS Client I wanted to have Description2 field as for some items the the description was so long that i could not fit into Descrtiption 1 field.

However, I managed to bring the Description 2 field in POS client, but particularly only that field is not highlighted in blue color like other fields.

Could you kindly let me know that what could be the possible reason for this? Why only Desc2 field is not highlighted in blue when i am scanning the item.

Attached is the snapshot for clarification. if you will notice, the text "Million Dollar Pack" in Desc2 field is not highlighted with blue color.

Thanks & Regards,
Fahd

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    Did you add the code to make it blue and bold?
    David Singleton
  • fahdfahd Member Posts: 226
    Dear David,


    Thanks for the reply, No i did not add the code.

    Can you please tell me how can i add that code?


    Thanks & Regards,
    Fahd
  • David_SingletonDavid_Singleton Member Posts: 5,479
    The code goes in the OnFormat trigger. If you don't know what that is, then get someone to do this for you.
    David Singleton
  • fahdfahd Member Posts: 226
    edited 2011-10-18
    Dear David,

    Yes i know the On Format Trigger and i have found it.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    fahd wrote:
    Dear David,

    Yes i know the On Format Trigger and i have found it.

    :thumbsup:
    David Singleton
  • fahdfahd Member Posts: 226
    Dear David,


    I am trying to add the code but i can't make it.

    In the existing Description 1 field i found this code under the ONFORMAT trigger.


    SmallDescription - OnFormat(VAR Text : Text[1024];)


    GetCurrLineColor();
    IF ("Parent Line" <> 0) AND ("Line No." <> "Parent Line") THEN
    IF COPYSTR(Text,1,1) <> '>' THEN Text := '>' + Text;
    CurrForm.SmallDescription.UPDATEFORECOLOR(ForeColor[CurrColor]);
    CurrForm.SmallDescription.UPDATEFONTBOLD(Bold[CurrColor]);



    I have copied the same to my desc2 field's ONFORMAT trigger and i replaced small description to desc2 which is my variable and field name.

    But i can't make it, Kindly guide me.
  • FDickschatFDickschat Member Posts: 380
    You need to amend the Name property of the field in the Form.

    CurrForm.SmallDescription.UPDATEFORECOLOR(ForeColor[Cu

    SmallDescription in this code line refers to the Name property of the control, not to the variable or field name.
    Frank Dickschat
    FD Consulting
  • fahdfahd Member Posts: 226
    Dear Frank,



    Ok, my field name in the "Pos Trans. Line" table is "desc2".

    I modified the record for this field under the triggger OnFormat and following is the code.


    desc2 - OnFormat(VAR Text : Text[1024];)


    CurrForm.desc2.UPDATEFORECOLOR(ForeColor[CurrColor]);



    But now when i am scanning the item following error is coming.

    "The Dynamic Property 'ColorSet' cannoot be changed in this content.

    You tried to change 'Colorset' the on the TexBox named 'desc2'
  • FDickschatFDickschat Member Posts: 380
    CurrForm.desc2.UPDATEFORECOLOR(255);

    The code above can only be run in the OnFormat Trigger of the Control with the Name "desc2". NAV will give the error you received if you try to set the forecolor of Field "desc2" in the OnFormat Trigger of another control (e.g. "desc 2").

    Check the Name property of the control where you have placed your code. Possibly you have 2 controls with the same Name and NAV references the wrong one.
    Frank Dickschat
    FD Consulting
Sign In or Register to comment.