web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)
Answered

Filtering a drop down list source in a Card Page

(0) ShareShare
ReportReport
Posted on by 5,136

I have a field in Sales Header that is CODE data type and the source for this is a table for the drop down values.  When I open this table via a Card Page, I want to limit the values being shown in the field drop down list to only 2-3 values of my liking.  Can anyone help direct me to the right syntax?  I was thinking maybe work on the lookup trigger of the ddlist...but I don't know what the syntax.  I also tried to work on table relations property of that field but maybe I am not doing it right as it doesn't seem to filter.  Thank you much.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    When you add the field on the Sales Header, in the table relation window specify the filter in the table filter. For example i have a table where code is the primary key with values STEST1,STEST2,VTEST1. If i want to filter always only those values starting with S then my table relation will look like this

    "Test Code" WHERE (Code=FILTER(S*))

    Where "Test Code" is the table name.

  • mbr Profile Picture
    5,136 on at

    HI Suresh,

    I implemented the TableRelations filter that you have suggested in the Page Designer level as I only want to filter the dropdown list to a few values on Sales Order Card page.  However, it doesn't seem to work as I think the TableRelations Filter in the Table Designer level supersedes it.  If I remove the TableRelations filter in the Table Designer level, it works.  But I don't want to remove it as this table is being used in other pages.  Is there a way for the Table Relations filter to kick in in the page level only or to add with?

    Please advise.

  • mmv Profile Picture
    11,471 on at

    Hi,

    Please check the below link too.

    http://kauffmann.nl/index.php/2011/10/17/controlling-the-drop-down-list-in-the-roletailored-client/

    Best Regards,

    MMV

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    One other way i can think is to add the code on the OnLookup trigger but that does not give you dropdown.

  • Verified answer
    mmv Profile Picture
    11,471 on at

    Hi,

    My suggestion is to change the TableRelation in the Table field with a Condition ( a conditional filter, i.e., e.g. if your above mentioned Card uses the "Document Type" as Order, you may use the specific filter of your choice, otherwise the existing option).

    format in the TableRelation property in the table -> field:

    IF (Document Type=CONST(Order)) Location WHERE (Use As In-Transit=CONST(No)) ELSE IF (Document Type=CONST(Quote)) Location

    Could you try it that way?

    Best Regards,

    MMV

  • mbr Profile Picture
    5,136 on at

    That did it!  Thank you MMV.  I modified the table relation logic in the Table Def and it worked! Much obliged.

  • mbr Profile Picture
    5,136 on at

    Thanks for the link MMV.  It was helpful but it also meant changing the code in the List Page but this list page is being used by other pages for ddlist.  I went with your other suggestion which is the table relation mod in the field level of table.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans