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 / Creating relationships...
Power Apps
Unanswered

Creating relationships on Azure SQL Tables

(1) ShareShare
ReportReport
Posted on by 4

I have two tables Tier and Degree.  They are virtual tables that exist in an Azure SQL database. After I create a relationship, I get an error stating "Something went wrong We weren't able to open your table. Try reloading or reopening." I've tried to create the relation both by adding the relationship to the table in PowerApps and as described here:  Setting up a virtual table relationship. Both result in the same error shown below. Below are the scripts that I used to create and populate the tables. What am I missing? Is there a way to get a useful error message?

 

Error.pngRelationship.png

 

 

CREATE TABLE [dbo].[testTier](
[TierId] [int] IDENTITY(1,1) NOT NULL,
[Tier] [nvarchar](25) NOT NULL DEFAULT '',
CONSTRAINT [pk_testTier] PRIMARY KEY CLUSTERED ([TierId] ASC),
CONSTRAINT [uc_testTier_Tier] UNIQUE (Tier)
)
GO

CREATE TABLE [dbo].[testDegree](
[DegreeId] [int] IDENTITY(1,1) NOT NULL,
[Degree] [nvarchar](25) NOT NULL,
[TierId] [int] NULL,
CONSTRAINT [pk_testDegree] PRIMARY KEY CLUSTERED ([DegreeId] ASC),
CONSTRAINT [fk_testDegree_Tier] FOREIGN KEY ([TierId]) REFERENCES [dbo].[testTier] ([TierId]),
CONSTRAINT [uc_testDegree_Degree] UNIQUE (Degree)
)
GO


insert into [dbo].[testTier] (Tier) values ('Associates')
insert into [dbo].[testTier] (Tier) values ('Bachelors')
insert into [dbo].[testTier] (Tier) values ('Masters')
insert into [dbo].[testTier] (Tier) values ('Clinical Doctorate')

 

insert into [dbo].[testDegree] ([Degree], [TierId]) values ('High School', null)
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'Associates', MAX(TierId) from testTier where Tier = 'Associates'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'BA', MAX(TierId) from testTier where Tier = 'Bachelors'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'BHS', MAX(TierId) from testTier where Tier = 'Bachelors'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'BS', MAX(TierId) from testTier where Tier = 'Bachelors'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'BFA', MAX(TierId) from testTier where Tier = 'Bachelors'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'PT', MAX(TierId) from testTier where Tier = 'Bachelors'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'M.Ed.', MAX(TierId) from testTier where Tier = 'Masters'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'MA', MAX(TierId) from testTier where Tier = 'Masters'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'Masters', MAX(TierId) from testTier where Tier = 'Masters'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'MBA', MAX(TierId) from testTier where Tier = 'Masters'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'DPT', MAX(TierId) from testTier where Tier = 'Clinical Doctorate'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'OTD', MAX(TierId) from testTier where Tier = 'Clinical Doctorate'
insert into [dbo].[testDegree] ([Degree], [TierId]) select 'DHS', MAX(TierId) from testTier where Tier = 'Clinical Doctorate'

I have the same question (0)

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