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 / Can I alias a set of c...
Power Apps
Answered

Can I alias a set of commands directly in the app to execute more easily?

(0) ShareShare
ReportReport
Posted on by 17

Hi all, quick question. I have some actions I take within my app (creating collections, running operations, updating variables, notifying, etc.) that are always run in sequence as a group. Can I alias them somehow, so I can just put something like "Do MyOperation" in an OnSelect, so I don't have to copy the same long set of code each time? Thanks!

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at

    Hi @RMDFA,

     

    I think what you are looking for are User Defined Functions. In this blog you can find more about them: Power Apps User Defined Functions: Write Code Once And Reuse (matthewdevaney.com)

  • RMDFA Profile Picture
    17 on at

    This looks close to what I need. However, I don't have any input parameters, it's just a series of operations I want to run (ClearCollect, run a Flow, UpdateContext, If/Or, calling a connector) when a button is pushed. Is there something I'm missing?

  • Verified answer
    BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at

    Hi @RMDFA ,

     

    In that case Named Formulas are what you're after: 6 Use-Cases For The Power Apps App Formulas Property (Named Formulas) (matthewdevaney.com)

  • RMDFA Profile Picture
    17 on at

    Hi @BCBuizer - this did exactly what I need. Thanks for the quick answer. I'm running into an issue where PowerApps removes the semicolon from the end of my formula (which makes it not work), but otherwise does what I wanted

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard