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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / looking for solution t...
Power Apps
Unanswered

looking for solution to Create a canvas app with DataVerse one to many relation tables

(0) ShareShare
ReportReport
Posted on by 6

Hi,

I'm new to the platform....

With 2 Data Verse tables (Table A (parent)& Table B (child)with one to many relation and lookup column)

Trying to build a form in canvas where user need to enter data that supposed save back in to two data verse tables and have a relation between table A with many relation to table B.

I need the edit screen to allow the user to enter the data to both tables, should be able to save it from the same screen.

I'm looking for a solution in order to get this done, so that once the user save the data, user should be able to select it from the browse screen to display that on the detail screen from the two tables. (table A & related items in Table B)

I'm struggling to get this relation configured, i was able to save the data but i could not generate the relation between table A & table B. because display screen is showing data from table A, not showing the related data from table B for that particular item.

 

hope you can understand what I'm trying to do in the app. thanks for your assistance.

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @DanielMat 

    If you have established the relationships between the tables in Dataverse, you can use dot notation to demonstrate the galleries and forms needed in your app. In the app below, There are three tables Orders, 'Order Details' and Products. They are in two one-to-many relationships: Orders can have many 'Order Details' and 'Order Details' can have many products.  The forms are on the right side, in blue and green respectively.

    _9.jpg

  • DanielMat Profile Picture
    6 on at

    Hi @Drrickryp ,

    I idea is to have New form to create new request, i added these two edit forms on this New form screen "New Request" & "Request Details" are two tables with one to many relation and with "+" user should be able to add more items(to "Request details" table) to the same request. i tried to add as you suggested but when i display it on the display screen related values from the request details table are not showing. in this i will not have an "ID"until the form is saved,so how the look up column  in the request details table will get the ID from the New Request table?

    On the home screen when the item is selected navigate to the display screen or click on the "+" to create new item as shown in images.

    New Form screen:

    DanielMat_0-1668626464854.png

    Display screen:

    DanielMat_1-1668626503068.png

    Home screen:

    DanielMat_3-1668626761227.png

     

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @DanielMat 

    That is true of all New forms.  The ID is created when the form is saved.  To capture it, you can use Set(L_id, Form1.LastSubmit.ID) in the OnSuccess property of the form.  Also, a child record cannot be created until there is a parent record. 

  • DanielMat Profile Picture
    6 on at

    Hi @Drrickryp 

    I'm storing the child records in collection, and on success property of the form1(parent), i have this code below,

    it is is giving this error:

    Incompatible type: the 'Request Lookup' column in the data source you're updating expects a 'Record' type and you're using a 'text' type.

     

    if(
     Form1.Mode = FormMode.New,
     Patch(
     'Request Details',
     UpdateIf(requestdetailcol,true,{'Request LookUp':Form1.LastSubmit.ID}
     )
    );
    Clear(requestdetailcol));

     

    DanielMat_0-1668646090639.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard