Option Field Values

sbhattbngsbhattbng Member Posts: 1
Hi Folks -

A small help needed here. I have a option field called Contractor type which has option values ,Supplier,Retailer,Warehouse,In house.
When I add this field to a page I just want to show the option values of ,Supplier,Warehouse but not retailer. I tried removing the option values on the page and just put ,Supplier,Warehouse and it does show only these 2 option but when I select Warehouse on the page it selects Warehouse but in the table it stores it as Retailer. Any help is truly appreciated.

Thanks
RJ.

Answers

  • JJMcJJMc Member Posts: 39
    Is it really an Option field or is it an ENUM?

    If it is an option field, you can use the optioncaption property in the page as follows:
    Let's imagine the field in the table is like this:
    field(50000; OptionExample; Option)
    {
    DataClassification = CustomerContent;
    Caption = 'Example';
    OptionMembers = " ",OptionA,OptionB,OptionC;
    }
    In the page, you can do this to hide the OptionB value:

    field(Example; Rec.OptionExample)
    {
    ApplicationArea = All;
    OptionCaption = " ",OptionA,,OptionC;
    }
    Notice tha the OptionB in the field disappears, but do not remove the comma (,)

    if it is not an option and it is an enum, just use in the page the property ValuesAllowed = " ",OptionA,OptionC;

    I hope this is helpful for you
Sign In or Register to comment.