Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Dataverse/Modeling
Reference · Dataverse

Modeling

Part of Dataverse. Install the skill and your agent reads this page when it needs the depth.

Dataverse modeling for Power Apps apps

Tables, ownership, relationships, column types, alternate keys, calculated columns and auditing — what to decide before creating, because a lot of it cannot be undone. Solution, environment and environment variables are ALM: skills/power-platform/references/alm-environments.md.

Contents

  1. Who creates the schema
  2. Names and convention
  3. Table: ownership and primary name
  4. Column types: what to choose
  5. Relationship: Lookup, Choice or text
  6. Denormalized columns
  7. Alternate keys
  8. Calculated and rollup columns
  9. Requirement level
  10. Auditing and trail
  11. Checklist before creating

1. Who creates the schema

Choose one owner per environment and declare it:

Owner Advantage Risk
Maker by hand / Excel Fast, no prerequisite The as-built diverges from any plan; default publisher; wrong types
Script (Web API) Reproducible, idempotent, versionable Needs a credential and maintenance; the environment can be changed from outside and diverge from the script
Imported solution Reproducible across environments (ALM) The schema is born in the source environment

Whichever it is, after creating, extract the as-built (references/as-built-names.md) and start writing against it. In a reference project, a complete script was written (publisher, choices, tables, columns, Lookups, alternate keys, idempotent) and never used: the environment was built by hand beforehand. [verified: reference project] The script did not become the authority just by existing.

If it is a script: it should read the dictionary (not embed the schema), be idempotent (skip what exists), check the result (integer values of the Choices, EntityKeyIndexStatus) and not run against an environment that already has hand-made tables without first extracting the as-built.

2. Names and convention

3. Table: ownership and primary name

4. Column types: what to choose

Need Type Note
Closed domain (small, stable list) Choice (local or global) Validates on the server; Choices() feeds the ComboBox; a new option is a schema change, not a screen change
Closed domain shared across tables Global choice Integer values prefixed by the publisher: do not assume 1,2,3
Domain that changes without a schema change (a user-maintained list) Table + Lookup Keeps integrity; cost: a join
Short code the business already uses as a key (an abbreviation) Single line of text + alternate key on the source table Loses referential integrity
Yes/No Yes/No col = true
Date only (deadline, birth date) Date only Removes time zones and the class of bug of comparing dates as text
Instant (event, audit) Date and time, explicit time zone behavior UserLocal for what the user sees; TimeZoneIndependent for what cannot change
Numeric identifier of a legacy system Whole number Candidate for an alternate key to import
Short text Single line of text with a length Limit the length; long text does not filter well

Rules:

5. Relationship: Lookup, Choice or text

Option Integrity Delegation Import When
Lookup Yes (Dataverse guarantees it) Filtering by the Lookup compares with a record; by a column of the related table: a join, avoid Resolves by the primary name column or by the alternate key A real 1:N relationship the business requires to be intact
Choice Closed domain = delegates Resolves by label Small, stable list with no attributes of its own
Text with a code None = and StartsWith delegate Trivial Short deadline; the risk is accepted (see below)

What is lost when swapping a Lookup for text [verified: reference project]:

If the as-built already has text in place of the Lookup, record the divergence as a decision (keep or realign, references/as-built-names.md §6) and compensate: validate the domain in the flow before writing, and check the text against the source table on the registration screen.

6. Denormalized columns

A hot filter on a column of a related table forces a join and puts delegation at risk (references/dataverse-delegation.md). The way out is to copy the column to the child table as text:

Distance to the data Solution
0 levels (column of the table itself) filter directly
1 level (Lookup column) compare the Lookup with the record
2 levels (Lookup of the Lookup) denormalized column on the child table

[unverified: the premise that filtering by a Lookup column "gives up delegation" came from the plan of a reference project; Learn talks about a limit on lookup levels. Test with limit 1 before calling denormalization mandatory.]

Rules for denormalization: document who writes the copy (the flow, in the same action that creates the row) and when diverging is correct (the trail keeps the value in force at the event, not the current one).

7. Alternate keys

An alternate key = one or more columns that identify a row without the GUID. It is what enables upsert and import that resolves a Lookup by a business key. (Define alternate keys, for developers).

Facts:

Define the alternate key when modeling, activate it and wait for Active before importing or bringing up the flow.

8. Calculated and rollup columns

9. Requirement level

Requirement levels in Dataverse: optional, business recommended and business required. Required breaks the load of legacy data that lacks the field.

Situation Decision
New rule, no legacy Required
The business rule demands it, but the legacy is empty (e.g. the vast majority has no date) Recommended in Dataverse + requirement in the flow for registration/editing

That way the legacy comes in as it is (empty is information) and the rule holds for 100% of new records. Before deciding, measure the legacy: [verified: reference project] — nearly all rows came without the date the rule requires; if it were required in the schema, the whole historical load would fail. Confirm with the operation first: if the rule was never practiced, making it required in the flow blocks registration on day one.

10. Auditing and trail

Two different things:

11. Checklist before creating

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.