
Announcements
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?
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'