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 / Calling a flow from a ...
Power Apps
Suggested Answer

Calling a flow from a User Defined Function

(0) ShareShare
ReportReport
Posted on by 7
I have an application that calls a number of flows, feeds them an input variable (data type number), and they each return a JSON string. I then convert those strings into collections. 
 
The input variable can be updated on numerous pages within the app, and I don't want to replicate the extensive code to call all the flows in multiple places.
 
Prior to User Defined Functions I had a slider default property linked to the input variable, with the code in the onchange property. Whenever the input changed, the flows all ran and the collections were updated.
 
When User Defined Functions came along, I was excited until I realised that they operate from within App Formulas, and you can't call behaviours (Flows) from within App Formulas.
 
Then Microsoft changed something in the back end, and state changes to sliders and timers are no longer detected in published apps, despite continuing to be in the editor. The next time I published an update of my app, the timers all stopped working. I have researched widely and tried all sorts of things, but at the end of the day, no joy.
 
Is there some way to define a function with full functionality (i.e. run behaviours, accept all data types as inputs and outputs) without having to jump through hoops or manipulate other things?
Other languages have been doing this for decades.
 
Any help is appreciated.
 
Thanks,
Dave.
I have the same question (0)
  • Suggested answer
    sannavajjala87 Profile Picture
    515 Super User 2026 Season 1 on at
    Hi Dave,
     
    What you’re running into is a current limitation of Power Apps rather than something you’re missing. User Defined Functions are strictly formula-only, so they can’t execute behaviors like calling flows, which is why they don’t replace your earlier pattern. There isn’t a true “full-function” construct today that combines both behaviors and return values like in traditional programming languages.
    The recommended pattern in most cases is to centralize your flow calls in one place and trigger them explicitly, typically by:
    • Using a single reusable wrapper pattern (e.g., one button, hidden control, or component) that runs all flows
    • Calling that logic from screens via Select() or by toggling a variable
    • Storing results in global variables/collections that other screens can consume
    The slider/timer trick used to work as a pseudo-trigger, but as you noticed, those indirect state-change triggers are no longer reliable after recent platform changes.
    So unfortunately there’s no clean “function with side effects” yet,  the best approach is still to centralize behavior logic and trigger it explicitly, rather than trying to rely on reactive formulas.
     
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    For your scenario, the cleanest and most maintainable approach is to replace the multiple flow calls with a single "master" Power Automate flow that accepts the
     
    input number, invokes the necessary child flows (or performs the work itself), and returns a single JSON payload. Your app then makes one Flow.Run() call and
     
    updates the required collections in one place. This avoids duplicating code across screens, removes the dependency on timer/slider workarounds, and aligns with
     
    the current capabilities of Power Apps until Microsoft introduces support for reusable behavior functions.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard