Power Fx User Defined Types Reach General Availability: A Major Step Toward Enterprise-Grade Power Apps

Microsoft has announced the general availability (GA) of User Defined Types (UDTs) in Power Fx, a significant milestone in the evolution of Power Apps as a professional low-code development platform. Available beginning with Power Apps Studio version 3.26044, UDTs are enabled by default for new applications and can be activated for existing apps through Settings > Updates > New > User Defined types.

The release completes a trio of major Power Fx enhancements that have recently reached production readiness: Enhanced Component Properties, User Defined Functions (UDFs), and User-Defined Types. Together, these capabilities help developers build larger, more maintainable applications with stronger typing, improved reusability, and better error prevention.

What Are User Defined Types?

User Defined Types allow developers to create custom data structures in Power Fx. Instead of passing individual values around an application, related information can be grouped into a strongly typed record or table.

For example, a developer can define a Book type containing a title, author, page count, and publication date:

Book := Type(
{
    Title: Text,
    Author: Text,
    Pages: Number,
    Published: Date
}
);

This approach mirrors concepts found in traditional programming languages, where classes, structs, or interfaces help organize data into reusable objects.

Rather than managing four separate variables, developers can now work with a single, well-defined Book object throughout the application.

Using UDTs with User Defined Functions

One of the most powerful benefits of UDTs is their integration with User Defined Functions.

A function can now accept a complete record as a parameter:

AddBook( newBook: Book ) : Void =
{
    Collect( Library, newBook )
};

Instead of passing multiple arguments such as:

AddBook(
    title,
    author,
    pages,
    publishedDate
)

Returning Typed Tables from Functions

UDTs are not limited to individual records. Developers can also define strongly typed tables.

For example:

Books := Type( [ Book ] );

A function can then return a filtered collection of books:

FastReads(): Books =
    Filter(
        Library,
        Pages < 200
    );

This gives Power Fx full awareness of the table structure, enabling better IntelliSense, validation, and maintainability.

Why Strong Typing Matters

Traditionally, Power Apps makers often worked with loosely structured records and collections. While flexible, this approach can become difficult to manage as applications grow.

Consider a scenario where one formula expects:

{
    Title: Text,
    Published: Date
}

but another supplies:

{
    BookTitle: Text,
    PublishDate: Text
}

Without strong typing, errors may only appear at runtime.

With User Defined Types, Power Fx validates structures during development, helping catch mistakes before deployment.

Simplifying JSON Processing

One of the most practical uses for UDTs is working with JSON.

JSON data often arrives as untyped text. Developers typically need to convert individual values manually before using them.

With UDTs, ParseJSON can automatically validate and convert incoming data.

Example: Valid JSON Conversion

AddBook(
    ParseJSON(
        "{
            ""Title"": ""Hound of the Baskervilles"",
            ""Published"": ""1902-03-25""
        }",
        Book
    )
)

Because the Book type specifies that Published is a Date, Power Fx automatically converts the ISO 8601 string into a native Date value.

Example: Invalid JSON Data

AddBook(
    ParseJSON(
        "{
            ""Title"": ""Hound of the Baskervilles"",
            ""Published"": ""03/25/1902""
        }",
        Book
    )
)

This generates a validation error because the date format does not match the expected ISO standard.

By enforcing type rules during parsing, developers can detect data quality issues before they affect application logic.

Safer Conversions with IsType and AsType

When working with dynamic data, developers may want to verify a structure before converting it.

Power Fx now supports this through the IsType and AsType functions.

Checking Data Before Conversion

If(
    IsType( jsonRecord, Book ),
    AsType( jsonRecord, Book ),
    Blank()
)

This pattern prevents runtime failures when unexpected data is received from APIs or external services.

Processing Multiple Records

ForAll(
    ParseJSON(
        "[ 
            { ""Published"": ""03/25/1902"" },
            { ""Published"": ""1902-03-25"" }
        ]"
    ),
    If(
        IsType( ThisRecord, Book ),
        AsType( ThisRecord, Book ),
        Blank()
    )
)

The first record fails validation and returns Blank(), while the second successfully converts into a strongly typed Book record.

This creates a safer and more resilient data processing pipeline.

Creating Types with RecordOf

Microsoft has also introduced RecordOf, making it easier to derive a record definition from an existing table type.

Suppose a developer begins with a Books table:

Books := Type(
[
    {
        Title: Text,
        Author: Text,
        Pages: Number,
        Published: Date
    }
]
);

Instead of redefining the Book record separately, it can be generated automatically:

Book := Type(
    RecordOf( Books )
);

This ensures consistency between table and record definitions and eliminates duplicate type declarations.

Real-World Benefits for Enterprise Teams

For enterprise development teams, User Defined Types provide several practical advantages:

Better Readability

AddBook( newBook )

is far easier to understand than:

AddBook(
    title,
    author,
    pages,
    publishedDate
)

Improved Reusability

A single Book type can be used across:

  • Functions
  • Collections
  • JSON parsing
  • API integrations
  • Components

Stronger Validation

Errors are detected during development instead of appearing after deployment.

Easier Maintenance

When a field changes, developers update the type definition once instead of modifying formulas throughout the application.

The Bigger Picture

Combined with User-Defined Functions and Enhanced Component Properties, UDTs bring many of the advantages of traditional software engineering into Power Apps while maintaining the accessibility that attracts citizen developers.

For organizations building mission-critical business applications, the result is cleaner code, stronger validation, better scalability, and a significantly improved development experience.

Final Thoughts

The general availability of User-Defined Types is more than just another Power Apps feature release. It introduces a stronger foundation for building reliable and maintainable applications by enabling structured records, typed tables, safer JSON parsing, and reusable business logic.

For teams already using Power Apps in production, now is the perfect time to begin adopting UDTs. The combination of strong typing, reusable functions, and improved validation can dramatically reduce complexity while making applications easier to scale and maintain over time.

Source: https://www.microsoft.com/en-us/power-platform/blog/power-apps/power-fx-user-defined-types-generally-available/