AL icon indicating copy to clipboard operation
AL copied to clipboard

enum-Property ValuesAllowed in table and page does not prevent that filtering shows all enum-Values of that field

Open KlausMaxSchwab opened this issue 7 months ago • 0 comments

Please include the following with each issue:

1. Describe the bug This shows the complete enum: Image

Table contains a ValuesAllowed-Property: Image

Page contains a ValuesAllowed-Property (trying to see any difference): Image

Filtering this field in page shows all enum-positions and not only the ValuesAllowed Positions: Image

2. To Reproduce Take any enum with some more positions. Shorten allowed values in table or list-page for a field using this enum. Use Page-Filter to filter the field. You will see all positions of enum to filter this field.

enum: 
enum 50000 "BOSS Game System"
{
    Extensible = true;

    value(0; " ")
    {
        Caption = ' ', Locked = true;
    }
    value(1; OLGS)
    {
        Caption = 'OLGS', Locked = true;
    }
    value(2; PMU)
    {
        Caption = 'PMU', Locked = true;
    }
    value(3; IGP)
    {
        Caption = 'IGP', Locked = true;
    }
    value(4; IBP)
    {
        Caption = 'IBP', Locked = true;
    }
    value(5; Jass)
    {
        Caption = 'Jass', Locked = true;
    }
    value(6; Lose)
    {
        Caption = 'Lose', Locked = true;
    }
    value(7; VSL)
    {
        Caption = 'VSL', Locked = true;
    }
    value(8; PSS)
    {
        Caption = 'PSS', Locked = true;
    }
    value(9; SGI)
    {
        Caption = 'SGI', Locked = true;
    }
    value(10; SBE)
    {
        Caption = 'SBE', Locked = true;
    }
    value(11; Big21)
    {
        Caption = 'Big21', Locked = true;
    }
    value(12; Admiral)
    {
        Caption = 'Admiral', Locked = true;
    }
}
table:
field(8; "Play System"; enum "BOSS Game System")
        {
            Caption = 'Play System', Comment = 'Spielsystem';
            //OptionMembers = " ",OLGS,PMU,IGP,IBP,Jass,,VSL;
            //OptionCaption = ' ,OLGS,PMU,IGP,IBP,Jass,,VSL', Locked = true;
            ValuesAllowed = " ", OLGS, PMU, IGP, IBP, Jass, VSL, Big21;
        }
page: 
field(Spielsystem; Rec."Play System") { ApplicationArea = All; ValuesAllowed = " ", OLGS, PMU, IGP, IBP, Jass, VSL, Big21; }




Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior if ValuesAllowed is set in a table-field to shorten the quantity of enum-positions it should not be possible to get all positions as filter of this field in listpage.

4. Actual behavior A Filter in List-Page on a field of type enum will show all enum-positions to filter wether ValuesAllowed is set or not

5. Versions:

  • AL Language: 15.0.1433841

  • Visual Studio Code: Version: 1.100.3 (user setup) Commit: 258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3 Datum: 2025-06-02T13:30:54.273Z Electron: 34.5.1 ElectronBuildId: 11369351 Chromium: 132.0.6834.210 Node.js: 20.19.0 V8: 13.2.152.41-electron.0 Betriebssystem: Windows_NT x64 10.0.22621

  • Business Central: 26.1

  • List of Visual Studio Code extensions that you have installed: Image Image Image Image Image Image

  • Operating System:

    • [x] Windows
    • [ ] Linux
    • [ ] MacOS

Final Checklist

Please remember to do the following:

  • [x] Search the issue repository to ensure you are reporting a new issue

  • [x] Reproduce the issue after disabling all extensions except the AL Language extension

  • [x] Simplify your code around the issue to better isolate the problem

KlausMaxSchwab avatar Jun 12 '25 15:06 KlausMaxSchwab