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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Remove Filter from List Page

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    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
    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
    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
    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
    17,788 on at
    RE: Remove Filter from List Page

    Try

    this.query().clearQueryFilters();

  • Community Member Profile Picture
    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
    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
    on at
    RE: Remove Filter from List Page

    Vendtrans.png

  • Sohaib Cheema Profile Picture
    48,656 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
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans