Power Fx "User Defined Types" are now GA in Power Apps! 🎉
🧩 Bundle data into clean, reusable structures
🛡️ Strongly typed formulas = fewer errors
📦 Works great with JSON parsing
For example, bundled information on a Book: title, author, page count, publication year can be grouped together with appropriate types for each element using the Type function in the App object’s Formulas property:
Book := Type( {
Title: Text,
Author: Text,
Pages: Number,
Published: Date
} );
A book can be passed into a User defined function to be stored in a database:
AddBook( newBook: Book ) : Void = {
Collect( Library, newBook )
};
And a table of Books can be returned from a User defined function that filters on page count:
Books := Type( [ Book ] );
FastReads(): Books = Filter( Library, Pages < 20 );