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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to filter form using child data source field

(0) ShareShare
ReportReport
Posted on by 456

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

  • WillWU Profile Picture
    22,363 on at
  • Suggested answer
    Martin Dráb Profile Picture
    241,441 Most Valuable Professional on at

    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.

  • Ram Kumar Profile Picture
    456 on at

    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 ?

    Regards,

    Ram

  • Suggested answer
    Martin Dráb Profile Picture
    241,441 Most Valuable Professional on at

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 363 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 188

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans