Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Unanswered

Filter/find empty values in item list - how?

Posted on by 12
I'm trying to find all items that has a specific field without any data in it. 
For instance, I want to find all items that has no value in the GTIN-field. 
 
How can I do this without having to extracting all the items into an excel list and filter it there? 
 
Thank you!
  • Suggested answer
    Ariba Mehdi Profile Picture
    Ariba Mehdi 160 on at
    Filter/find empty values in item list - how?
    If you want to find it through development in AL, try this code to filter out the records where the field is empty. Here the [fieldname] can be replaced by the actual fieldname. 

    var
         recordItem: Record Item;
    begin
         recordItem.setfilter([fieldname], '=%1', ' ');
         recordItem.findset();
    end;
     
    Hope this helps!
  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,201 Moderator on at
    Filter/find empty values in item list - how?
    For string field, you can filter the empty string like we do in AL code with single quotation marks ('')...
  • Suggested answer
    Brett F Profile Picture
    Brett F 164 on at
    Filter/find empty values in item list - how?
    A filter of 2 single quotes will filter to only items where the field is blank, like this:

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,339 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,177 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans