Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Remove Filter from List Page

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Dear Expert

How to remove filter from List Page

as per below coding

public void executeQuery()
{
QueryBuildRange QcustomerFilter;

this.Query().datasourceNo(1).clearRanges();


QcustomerFilter = SysQuery::findOrCreateRange(vendtrans_q.datasourceTable(tableNum(VendTrans)),fieldNum(VendTrans,AccountNum));

if (txtvendorcode.text()!="")
{
QcustomerFilter.value(queryValue(txtvendorcode.text()));
}
else
{
QcustomerFilter.value(SysQuery::valueUnlimited());
}

super();



}

image is attached

Thanks

2843.grid.png

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Hi Manish I use below code

    public void executeQuery()
    {
    QueryBuildRange qbrName;
    qbrName = SysQuery::findOrCreateRange(this.queryBuildDatasource(),fieldNum(MainAccount,Name));

    qbrName.value(FilterName.text() ?'*'+queryValue(FilterName.text())+'*' :SysQuery::valueUnlimited());
    super();

    }

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Afridi, Please share with us what was the solution? how did you fix it?

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Thanks every who replied and helped me finally problem is resolved.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Hi Afridi

    You can try QueryBuildDataSource.clearRange Method - msdn.microsoft.com/.../aa652635(v=ax.50).aspx

    for e.g.: qbds.clearRange(fieldNum(VendTrans,AccountNum));  

  • Brandon Wiese Profile Picture
    Brandon Wiese 17,786 on at
    RE: Remove Filter from List Page

    Try

    this.query().clearQueryFilters();

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Looking for support for below code can not clear the filter....Thanks

    public void executeQuery()

    {

    if (txtvendorcode.text()!="")

     {

        SysQuery::findOrCreateRange(VendTable_ds.query().dataSourceTable( tableNum(VendTable)),fieldNum(VendTable,AccountNum)).value(SysQuery::value(txtvendorcode.valueStr()));

     }

    else

     {

         Vendtable_ds.queryBuildDataSource().clearRanges();   //Not Working

         SysQuery::findOrCreateRange(VendTable_ds.query().dataSourceTable(tableNum(VendTable)),fieldNum(VendTable,AccountNum)).value(SysQuery::valueUnlimited());

     }

    super();

    }

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    executequery works for first time next time i have to remove search from list page because last searches remain on list page

    i have created other form from salesline table same functionality working fine

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Vendtrans.png

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Remove Filter from List Page

    are you sure that 'Vendor Account' is coming from VendTrans...??

    what is field name if you right click on it and click personalize

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove Filter from List Page

    Thanks Sohaib i try but not working. My data source is bind to query.

    On another form my data source bind to "SalesLine" table and it is working fine.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,253 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans