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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

When to choose to add datasource to a form or create display method?

(0) ShareShare
ReportReport
Posted on by 1,821

Hi,

I created 3 tables

Table1 has two fields: table1Id, table1Name

Table2 has two fields: table2Id, table2Name

Table3 has two fields: table1Id, table2Id

 

Now if I create a form with Table3 datasource to display data in Table3. And let's say I want to show table2Name and table1Name in the form as well?

Which is better and why?

1. Create two display methods to display the names from table1 and table2

OR

2. change the form datasource to have Table3 joined with table1 and table2? And drag the 2 name fields from each table to appear in the grid?(

Also if I'm going to go with option 2..does it matter if I join table 3 (1st datasource) with table 2 and table 1..or if I make table1 the parent then join it with table2 and Table3?

 

 

 

 

 

 

 

 

 

I have the same question (0)
  • ergun sahin Profile Picture
    8,816 Moderator on at
    RE: When to choose to add datasource to a form or create display method?

    The size of the data should also be taken into account. If you add a table with million records (with an inner join) to a table with 5-10 records, just to show the name, you won't be doing much logical work.

    In addition, the place where you will use the display method and the number of displays are also important in selection. It is obvious that the display methods are slowing the form. You don't have a problem up to a point, but if you add 10/15 display method to the grid, you shouldn't expect performance.

  • Martin Dráb Profile Picture
    235,914 Most Valuable Professional on at
    RE: When to choose to add datasource to a form or create display method?

    Using a single database query (with three joined tables) is obviously much more efficient then using one query to fetch Table3 and then two more queries for each record (to fetch Table1 and Table2). For twenty records, it means 41 queries instead of just one. The impact doesn't have to be that bad if you use caching, but it's still worse for performance.

    By the way, you forgot a third option. If you use surrogate keys to link those tables, you can choose replacement groups in the form that contain both IDs and names. The system will add necessary joins under the hood, therefore it's less work than in your two options (and the list of fields can be changed by a single property). On the other hand, the UI may feel a bit strange.

  • André Arnaud de Calavon Profile Picture
    297,339 Super User 2025 Season 2 on at
    RE: When to choose to add datasource to a form or create display method?

    Hi IntegrationBeginner,

    There is no better option. It depends on the requirements. If you need to be able to search and filter on the names from table1 and table2, then the display methods are not the way to go forward.

    For option 2, what table to use as the primary data source also depends on the requirements.  

  • Suggested answer
    huijij Profile Picture
    19,811 on at
    RE: When to choose to add datasource to a form or create display method?

    Hi IntegrationBeginner,

    In my opinion,both methods are suitable, option1 is more flexible, is it not only for fields from other table but also be the calculation results, eg: the sum of the column.Option 2 may be friendly to beginners for it less for code part.

    You may check the MS document to add data sources to forms through extension:

    docs.microsoft.com/.../add-datasource

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 764 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 619 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans