web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Unanswered

Declare User Defined Data Types for Powerapps Canvas

(2) ShareShare
ReportReport
Posted on by 8
Hi,
 
I saw in the latest update that powerapps supports custom data types to be used in UDFs. Can you help describe how to declare them
 
I have the same question (0)
  • adithyaselv Profile Picture
    Microsoft Employee on at
    Declare User Defined Data Types for Powerapps Canvas
    Hi,

    You can declare a user-defined time in the Formulas property similar to UDF and then use it in UDF . Please find a simple example below.

    -----
     
    //Record type
    Point := Type({x: Number, y: Number});
     
    // UDF to compute distance between two points
    distance(a:Point,b:Point):Number = Sqrt(Power(b.x - a.x, 2) + Power(b.y-a.y, 2));
     
    //Table type
    Points := Type([Point]);
     
    // UDF to check if the given table of points contains a particular point
    containsPoint(points: Points, target:Point): Boolean = CountIf(points, ThisRecord.x = target.x && ThisRecord.y = target.y) > 0;

    ----

    notice that you need to use := to declare user-defined type. Type is a special function used to construct a type definition.
  • Suggested answer
    adithyaselv Profile Picture
    Microsoft Employee on at
    Declare User Defined Data Types for Powerapps Canvas
    Hi,

    You can declare a user-defined time in the Formulas property similar to UDF and then use it in UDF . Please find a simple example below.

    -----
     
    //Record type
    Point := Type({x: Number, y: Number});
     
    // UDF to compute distance between two points
    distance(a:Point,b:Point):Number = Sqrt(Power(b.x - a.x, 2) + Power(b.y-a.y, 2));
     
    //Table type
    Points := Type([Point]);
     
    // UDF to check if the given table of points contains a particular point
    containsPoint(points: Points, target:Point): Boolean = CountIf(points, ThisRecord.x = target.x && ThisRecord.y = target.y) > 0;

    ----

    notice that you need to use := to declare user-defined type. Type is a special function used to construct a type definition.
  • IAmIntractable Profile Picture
    272 on at
    Declare User Defined Data Types for Powerapps Canvas
    I don't believe this is a general release feature yet.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard

Featured topics