Options

Add a global variable in dropdown filter page

jasr23jasr23 Member Posts: 14
Hi everyone!
In a NAV 2015 Page, is it possible to add a global variable in the dropdown list filter in addition to the source table fields? This variable is receiving the value from the CU 408 - Dimension Mngt.

Thanks in advance

Answers

  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    No, I'm afraid. A dropdown is shown by the UI when the source is an Option - be it a variable or a table field of Option type.

    These types have a list of available options defined at design time, it is not possible to update or change them at run time.


    You can mimic a dropdown to some extent. You can do this by adding a global variable of type code, putting a field on a page with the variable acting as a source, and defining the relation on the page field to a table.
    If the table has a FieldGroup 1 defined on it, called DropDown, and if this field group will have only a single field, then the lookup window opened when someone start typing in the field will look like a dropdown.

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    YuryYury Member Posts: 59
    Hi, jasr23
    I've added filter field in the source table and table relation property of field, needed to be dropdown. And then added code on OnAfterGetRecord trigger of page to fill filter field with my conditions. Works fine.
    Regards,
    Yury
  • Options
    jasr23jasr23 Member Posts: 14
    Thanks Yury! It works perfectly.
  • Options
    Mayank_JangidMayank_Jangid Member Posts: 1
    Hello @jasr23 have you got the solution of your question ?

    I have the same question ?

    Please reply as soon as possible.
Sign In or Register to comment.