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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Custom filtering in grids

(1) ShareShare
ReportReport
Posted on by 8
Hello,
I have a scenario in which I have added a FormComboBox control to filter in a grid.
I have added a logic in the Modified method of the control to clear and add range whenever the user is changing the control value.
I then made the form data source execute query call.
However, I have noticed that if ever I have manually added a range on another field via the form UI (i.e. right clicking on the grid field value and used the UI to apply a filter), then the said range is being cleared when I change the combo control value.
Example of my scenario. The table is a TSTProductTable. The combo control is filtering on ProductType field. If ever the user manually filters on the ProductId, then the filter on the productId needs to be applied whenever the control value changes.
Is there any way to do it such that any other manually applied filter is still being applied?
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,970 Most Valuable Professional on at
    It seems that you delete all ranges in your code. Stop doing it if you don't want it.
     
    Instead of clearing all ranges, you may want to use findOrCreateRange() for your field. If a range exists, you'll change its value, instead of removing the range and creating a new one.
     
    The safest solution is deleting all ranges for the field, because there could be more than one. But it's questionable whether you need this more complex approach.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans