Announcements
No record found.
Hi,
I have a form with two datasources. I want to filter the form based on the child datasource field.
How to write execute query to filter the form. Here I have used one combobox control for filter. Help me on this.
Regards,
Ram
Hi Ram,
Please check the old thread:
community.dynamics.com/.../join-form-data-sources-by-code-in-x
How are the data sources joined or linked?
If they're linked (e.g. with a Delayed link), you can't filter the parent data source by applying a filter to the child data source, because they're in two separate queries. You'll need to add one more data source (for the child table) joined to the parent data source and filter this data source.
Hi Martin,
Yes they both are linked. type::innerjoin they both have relation on accountno. Only two tables have this relation. Could you please provide some code samples ?
If the type is InnerJoin, they're joined, not linked. They form a single query and applying a range to either data source will impact the query.
You can add a range by something like this:
SysQuery::findOrCreateRange(MyTable_ds, fieldNum(MyTable, MyField)).value(...);
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 536 Most Valuable Professional
André Arnaud de Cal... 363 Super User 2026 Season 2
CU-1234529-002 188