Skip to main content

Notifications

Announcements

No record found.

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?

  • GirishS Profile Picture
    GirishS 27,816 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,550 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,816 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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans