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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Object Oriented Code
Power Apps
Unanswered

Object Oriented Code

(0) ShareShare
ReportReport
Posted on by 381

Hi

There are a few posts on reusing code but very little on using Object Oriented Code.

I have a few apps with a lot of code, particularly in OnStart, to collect/process information for use throughout the app.

The problem is the huge volume of code to trawl through to maintain.

 

In my PHP coding days we could use Include() or IncludeOnce() to pull through blocks of reusable code.

This made debugging much easier and by working with objects it made complex coding much, much easier.

 

Is there any equivalent to this in PowerApps - if not can we add it to the wish list?

Categories:
  • meelamri Profile Picture
    468 on at

    Hi, 

     

    I understand your pain. I recommend thinking component. It is the only way to reuse pieces of code: 

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-component

     

    Good Luck !

  • Gary_Eden Profile Picture
    381 on at

    Hi @melamri ,

    I've started playing with components recently, they are a big step forward.

    However, from what I can tell, it doesn't look like you can include a component within the OnStart, OnVisible property etc.

     

    Ideally, what I'm looking for is a way to create my own reusable functions that I can include where I want them and pass variables as needed. - May be even get to a point where I can have a central library of functions that I can call from multiple apps.

     

    Cheers 

  • Itamar_Filho Profile Picture
    3 on at

    Hello @Gary_Eden, you are looking for something like this, I saw that your publication is very old, during this period did you find a way to do this object orientation? I have the same question

  • Gary_Eden Profile Picture
    381 on at

    Hi @Itamar_Filho 

    Since my original post and the replies the Low-code Plugin ability has surfaced, I came across this as part of revisiting PL200.

     

    I'm still not sure if Low-code plugins are production or preview and have started a separate post on the question

    here. Once confirmed as production it will make quite a difference. However, it looks like they won't be included in PowerApps for Teams (P4T) anytime soon - disappointing as a lot of the apps we build use P4T.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard