RonKochanowski
Feb 01, 2023Copper Contributor
Prep Data for Transfer to Dataverse
We are moving a solution from on-prem SQL to Dataverse and need to first do some clean-up. A SQL table, core_person_phone, is defined as:
CREATE TABLE [dbo].[core_person_phone](
[person_id] [int] NOT NULL,
[phone_luid] [int] NOT NULL,
[phone_number] [varchar](50) NOT NULL,
[phone_ext] [varchar](50) NOT NULL,
[unlisted] [bit] NOT NULL,
[phone_number_stripped] [varchar](50) NOT NULL,
[sms_enabled] [bit] NOT NULL,
[sms_provider_luid] [int] NULL,
[organization_id] [int] NOT NULL,
CONSTRAINT [PK_core_person_phones] PRIMARY KEY CLUSTERED
(
[person_id] ASC,
[phone_luid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
One of the [phone_luid] choices is 282, which is Mobile Phone. On the Dataverse side, a Mobile Phone is unique to the table, and is a stand alone field. Converting this entity will first require that I make the SQL values unique across the table, not only by [phone_luid].
So here's what I'm trying to find an answer to: How to make a Mobile Phone (phone_luid = 282) unique to that type, and not allowed in any other phone type. There can be one Mobile Phone defined in the table, period.
Any help would be greatly appreciated!