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 / Initiate flow from wit...
Power Apps
Answered

Initiate flow from within app

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So I have a fairly simple flow that copies an item from one SP list to another SP list and then deletes the item in the original list: 

BenjaminHalkier_0-1607618073759.png

Essentially they are lists of orders that are due and orders that have been completed.

Now, my issue is in the delivery app, I'm building. I want to implement a button (located in a screen that contains a DetailForm showing the selected item from the SP list) that will trigger said flow. To wit, I inserted a button, selected Power Automate for its OnSelect property, located my flow in the menu and then the following appeared in the formula bar: 

 

'Ekspeditionu.foto'.Run(
// I then added the reference to direct the flow to the Item Id in question:
'Ekspeditionu.foto'.Run(DataCardValue26)

 

This all works well and good. However, being the go-getter I like to think I am, I've decided to add a bit of panache. Taking a cue from one of Shane Young's tutorial videos (I'm sure you're all familiar) - https://www.youtube.com/watch?v=UWy5I_MuIgU - I decided to add a loading spinner to occupy and lock the screen while the flow is running and ultimately a navigation to a different screen, that holds a gallery showing the list of completed orders:

 

Set(varShowSpinner, true);
Set(varFlow,'Ekspeditionu.foto'.Run(DataCardValue26).result); // This bit triggers a few errors
Navigate('ArkivTransporter_BrowseScreen');
Set(varShowSpinner, false);

 

This is where my issues really start. When I put the trigger for the flow into a variable ('varFlow') I get a few errors:

 

Incompatible type we can't evaluate your formula because the context types are incompatible with the types of values in other places in your app.

 

and:

 

Invalid use of '.' // this is marked for the ".result" part of the formula)

 

I am scratching my head to figure out why this can work in the tutorial scenario and not mine.

Any ideas?

 

 

 

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Have you tried adding the Power Apps action "Respond to a PowerApp or flow" to the end of the flow?

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Jeff_Thorpe That's a great idea, but I seem to have solved the issue by editing the formula to this:

    BenjaminHalkier_0-1608283439321.png

    Or, in a more generic variant:

    Set(nameOfYourVariable, 'titleOfFlow'.run(parameterToPassToFlow))

    I guess it was the ".result" appendix that threw me off. But that's what you get when using a year-old tutorial 🙂

    The connected flow doesn't have a "Respond to a PowerApp or flow" action at the end, but PowerApps seems to respect its runtime regardless. I think the "Respond to a PowerApp or flow" action is intended for when you want to specify the contents of said response between flow and app/flow.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 834

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard