Iβve been exploring the powerful new features in Power Apps:
β
User-Defined Types (UDTs)
β
User-Defined Functions (UDFs)
To test them out, I built a clean and reusable function that generates user records for a Microsoft List using Office 365 data.
π Hereβs a simplified version of what I did:

ty_UserRecord := Type({
'@odata.type': Text,
Claims: Text,
Department: Text,
DisplayName: Text,
Email: Text,
JobTitle: Text,
Picture: Text
});
UF_AutoGenerateUserRecord(Mail: Text): ty_UserRecord = {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Mail,
Department: Office365Users.UserProfile(Mail).Department,
DisplayName: Office365Users.UserProfile(Mail).DisplayName,
Email: Office365Users.UserProfile(Mail).Mail,
JobTitle: Office365Users.UserProfile(Mail).JobTitle,
Picture: Office365Users.UserPhotoV2(Mail)
};
π This small abstraction allowed me to:
- Standardize user structure across the app π§©
- Encapsulate logic for easier reuse π
- Improve readability and reduce errors π
If you’re building scalable Power Apps, UDFs and UDTs are a game-changer.
Happy to share more if you’re curious!