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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Filter not empty inventSiteId from InventDim

(0) ShareShare
ReportReport
Posted on by 37

Hi there,

I am trying to filter not empty values for InventSiteId from InventDim table but it is still showing empty in my view for InventSiteId 

First, I created a query with below code and added datasource as InventDim.

public void init()
{
super();

QueryBuildDataSource qbdsInventDim = this.query().dataSourceName(tableStr(InventDim));

QueryBuildRange inventSiteIdRange = qbdsInventDim.addRange(fieldNum(InventDim, InventSiteId));
inventSiteIdRange.value(SysQuery::valueNotEmptyString());
inventSiteIdRange.status(RangeStatus::Hidden);
}

I used above query in my view and added fields.

I did build and sync db but I still see empty values in my View for InventSiteId.

I did try creating view based on InventDim and added range for inventSiteId and value as (SysQuery::valueNotEmptyString()) but it is still showing empty values in my View for InventSiteId.

Not sure what is wrong here. It must work with above code. Any suggestion?

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,833 Moderator on at

    Hi Richard gill,

    Have you consider adding a range in the view itself instead of code?

    Try adding range to field InventSiteId and keep value as empty string "" and check.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, Your query looks ok, If its standard form then please check if the range is getting reset. For instance, check executeQuery method of form dataSource.

    For D365 F&O queries, you can use below Forum for more suggestions.

    community.dynamics.com/.../dynamics-365-for-finance-and-operations-forum

  • Richard Gill Profile Picture
    37 on at

    Hi both,

    Its not standard form. Its a new query and view created for testing purpose.

  • GirishS Profile Picture
    27,833 Moderator on at

    Have you tried adding the range in the query itself as mentioned earlier?

    I

    Thanks,

    Girish S.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 67

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans