Skip to main content

Notifications

Community site session details

Community site session details

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

Two grids in one form

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I would like to create a new form. I have two tables, table A and table B. Between table A and table B there is some relation, R. On the form, there have to be two grids, one next to each other. In the first grid, there will be values of table A. When the user selects the value in the first grid (from table A), in the second grid will be shown a values from table B,  based on relation R. 

I am not sure if there is some pattern, that could be used for this? If there is not any pattern, where these grids would be next to each other, is there some pattern, where the grids would be below each other? I have tried to create my own "custom" patter for the "below" case, but I am not sure, how to add the values, when I add the datasource to the form, then in a pattern, I add some grid and in the grid, I add e.g. string, select data source on that string and the field, but when I open the form, the grid is empty. Am I missing something, please?

Many thanks.

  • Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Two grids in one form

    Are you talking about the first grid?

    First of all, make sure that the table contains some data in the current company. Maybe the result is correct, because there is nothing to show.

    Use just a single data source for the moment. Make sure that the grid refers to it in its Data Source property. Then drag fields from the data source to the grid. Build the form and try it once more. If you don't see anything, verify again that you're in the right company. If you're running the form from Visual Studio, you can set the company in project properties.

  • hfou Profile Picture
    4 on at
    RE: Two grids in one form

    Hi Martin,

    yes, the exchangerate form would be ideal. I just do not know what I am doing wrong, I create a form, add data source, but can not see any values in it. I have created the form based on the pattern, added data source, set the data source in properties, added field, in the properties of the field, I have selected the data source and then selected the field. But nothing is shown...

  • hfou Profile Picture
    4 on at
    RE: Two grids in one form

    Hi Vijay,

    thanks, yes, I was looking on this pattern, but in the documentation, there is the information, that this pattern should not be used for the form created by scratch, don't know why. There is other problem, that this pattern shows the grids below each other, not next to each other

  • Suggested answer
    Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Two grids in one form

    When choosing a form pattern and figuring out how to implement something, it's useful to look at existing forms in the standard application. For example, look at purchase orders - there is a grid for headers and another grid for lines. Or maybe you want a simpler form, e.g. simple list with details, when there is another grid in details. If you look into documentation (Simple List and Details form pattern), you'll find an example there: ExchangeRate form.

    Vijay is right that you should have each grid associated with one data source, and the data sources should be linked, but the link type should normally be Delayed, not Active.

  • Vijay Yelmame VY Profile Picture
    468 on at
    RE: Two grids in one form

    Hi hfou If I understand this question correctly you want to show records like below screen shot ?
    pastedimage1654747929557v1.png 

    If Yes, Then this can be done using Task Double pattern.
    Please refer below screen shot for design help.
    pastedimage1654748011488v2.png

    Change link type to active-
    pastedimage1654748064332v3.png

    Build your form and check the result, Please mark this as correct answer if it worked.
    MS Docs - docs.microsoft.com/.../task-double-form-pattern

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans