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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / linking two virtual (O...
Power Apps
Answered

linking two virtual (Odata) tables

(1) ShareShare
ReportReport
Posted on by 601

I have created two virtual tables  (using the same Odata V4 Data Source connecting to Azure Devops): "WorkItems" and "Projects". They both fetch fine.

Now I want to try to link these tables together with a one-to-many relationship; In the data source, a WorkItem is related with a Project

[
 {
 "WorkItemId": 2,
 "Project": {
 "ProjectId": "63514016-7f57-4796-bb5f-ebd85cd58620"
 }
 },
 {
 "WorkItemId": 3,
 "Project": {
 "ProjectId": "63514016-7f57-4796-bb5f-ebd85cd58620"
 }
 },
 {
 "WorkItemId": 7,
 "Project": {
 "ProjectId": "3c84cdd5-5e94-400c-947b-6bb587d132c2"
 }
 }
]

I have tried to add a LookUp field "Project" in the "WorkItem" table, that points to the "Projects" table, but when I try to fetch the "WorkItem" virtual table with that column, I get an error "Object reference not set to an instance of an object"

{
 "error": {
 "code": "0x80040224",
 "message": "Object reference not set to an instance of an object.",
 "@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040224&client=platform",
 "@Microsoft.PowerApps.CDS.TraceText": "\r\n[Microsoft.Xrm.DataProvider.Odata.V4.Plugins: Microsoft.Xrm.DataProvider.Odata.V4.Plugins.ODataRetrieveMultiplePlugin]\r\n[68a8f98b-2a40-ef11-8409-000d3ab83ecd: External plug-in implementation]\r\n\r\n\t\r\n\tQuery to OData source : https://analytics.dev.azure.com/xxxx/_odata/v4.0-preview/WorkItems\r\n\t\r\n",
 "@Microsoft.PowerApps.CDS.InnerError.Message": "Object reference not set to an instance of an object."
 }
}

 Is there any other way to link two virtual tables, using their navigation properties?

I have the same question (0)
  • MichaelFP Profile Picture
    1,999 Moderator on at

    @KoenJanssensPD  on the relationship between the virtual tables did you set correct the field name from the external data source. I face this issue when I set wrong name of the field on the data source

  • KoJaPD Profile Picture
    601 on at

    You mean the "External Name" field? I think I have set it correctly to "Project"?

    KoenJanssensPD_0-1720779032065.png

     

  • Verified answer
    MichaelFP Profile Picture
    1,999 Moderator on at

    @KoenJanssensPD  Yes, did you set the same name  that existing in you odata source? Another question is, the field type is a 

    guid?

  • KoJaPD Profile Picture
    601 on at

    I have been checking the data a bit further, and it appears that the ProjectID of the WorkItem is kept in another field "ProjectSK"
    I have used that field as the "External Name" on the relationship and it works; thanks for the tip!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard