Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Filter not empty inventSiteId from InventDim

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?

  • GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: Filter not empty inventSiteId from InventDim

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

    I

    Thanks,

    Girish S.

  • Richard Gill Profile Picture
    Richard Gill 37 on at
    RE: Filter not empty inventSiteId from InventDim

    Hi both,

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

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,547 Super User 2024 Season 1 on at
    RE: Filter not empty inventSiteId from InventDim

    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

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: Filter not empty inventSiteId from InventDim

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans