Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Integrating Flow in PowerApps

(0) ShareShare
ReportReport
Posted on by 364

Hi all, 

 

I have an app that tracks hours spent working on engineering projects. When an engineer submits their hours, my app needs to update a SharePoint site that logs the hours spent on each project. If any Engineer tries to submit hours for a day in the past, we require they get approval. My app currently logs the hours just fine, however I am struggling with getting the flow for an approval working in the app.

 

I have tried creating a flow based on a power app button, but am struggling with the formula to make it run properly. I have tried setting the OnSelect with a Run() formula, but I'm not sure if this is the ideal way to pull it off. I tried making a formula using Run, but I can't seem to get the syntax down. I'll include images, if anyone can help, I would greatly appreciate it!

 

Aurora_1-1632238774139.png

 

Aurora_2-1632238779405.pngAurora_3-1632238783894.png

 

Aurora_4-1632238789304.png

 

  • Z_Lukowski Profile Picture
    216 on at
    Re: Integrating Flow in PowerApps

    Hey, you're getting the error, because you're trying to pass 6 arguments instead of 5 probably:

    Z_Lukowski_0-1632253004732.png

     

  • LRVinNC Profile Picture
    2,297 on at
    Re: Integrating Flow in PowerApps

    I suspect a data type mismatch. 

    First, on your two choice fields try using, Selected.Value, not just Selected.   

    Second, is your hours field expecting a numeric value?  If so, you'll need to use Value(DataCardValue21.Text) to convert to numeric.  

     

    If you turn on Monitor, you can get additional insights into what is failing. Monitor1.jpg

    Use the request tab to see exactly what values are getting passed.

     

    Monitor2.jpg

    Use the response tab to see what error is being generated.

    Monitor3.jpg

     

     

  • Aurora Profile Picture
    364 on at
    Re: Integrating Flow in PowerApps

    Could there be a problem with the flow? The order is correct in the formula bar, it's possible that ".Selected" is the wrong follow up to Dropdown2_1 and 3_1, but I have no idea what to try instead, nothing else like .Text or .SelectedText works. I'm not sure how to " try passing constants for each of the 5 fields first and then substitute in the field you want to use one at a time until you figure out which one is generating your error" as I can't get the button to work while trying to set up the formula for the flow.

     

    I don't really know where to go from here.

  • LRVinNC Profile Picture
    2,297 on at
    Re: Integrating Flow in PowerApps

    Disregard my previous comment.  There have been some improvements in launching a flow since I last used one.  Your flow name is integrated into the .Run.    Verify that all of your parameter values are the correct fields and in the correct order.  In order to isolate which is the problem, you might try passing constants for each of the 5 fields first and then substitute in the field you want to use one at a time until you figure out which one is generating your error.

     

  • Aurora Profile Picture
    364 on at
    Re: Integrating Flow in PowerApps

    Aurora_0-1632242556790.png

     

  • Aurora Profile Picture
    364 on at
    Re: Integrating Flow in PowerApps

    PowerAppsbutton.Run(PowerAppsbutton, DataCardValue24.Text,DataCardValue18.SelectedDate, Dropdown2_1.Selected, Dropdown3_1.Selected, DataCardValue21.Text, DataCardValue22.SelectedItems)

     

    This still returns an error, so I'm not sure how I need to change the argument. 

     

    It's telling me that it expects 5 arguments, I'll include them below 

    Aurora_0-1632242070014.png

     

    I've also tried this to no success:

    PowerAppsbutton.Run('Engineering Project Timing Matrix', DataCardValue24.Text,DataCardValue18.SelectedDate, Dropdown2_1.Selected, Dropdown3_1.Selected, DataCardValue21.Text, DataCardValue22.SelectedItems)

     

    Any ideas?

  • LRVinNC Profile Picture
    2,297 on at
    Re: Integrating Flow in PowerApps

    You are missing the name of the flow that you are trying to run.  The first value after the open parenthesis should be the name of the flow, followed by the additional parms you want to pass.  Right now it has no idea which flow you are trying to run.

  • Aurora Profile Picture
    364 on at
    Re: Integrating Flow in PowerApps

    I have a formula that looks like this when I try to connect the flow:

     

    PowerAppsbutton.Run(DataCardValue24.Text,DataCardValue18.SelectedDate, Dropdown2_1.Selected, Dropdown3_1.Selected, DataCardValue21.Text, DataCardValue22.SelectedItems)

     

    The entire thing is underlined, so I'm not sure where the error actually is

  • Aurora Profile Picture
    364 on at
    Re: Integrating Flow in PowerApps

    The button currently just has SubmitForm(Form3) in the On Select field. It updates the SharePoint without any problems. There is currently no error, but it does not run a flow to get an approval like I want it to. Even if the date is in the past, it's fine to have the form update the SharePoint site, but I need a manager to be notified that a project has been updated with a date in the past. They then need to be able to "approve" the hours which could be as simple as putting the word "approved" in a column on the same SharePoint site. 

     

    I'll include an image, as stated, I can write to the site no issues, I just need to get an approval built in based on the date being in the past. 

     

    Aurora_0-1632239556307.png

    "Approved" could go under title 

  • LRVinNC Profile Picture
    2,297 on at
    Re: Integrating Flow in PowerApps

    What happens when you click request approval?  Are you getting an error?  And what do you have in that On Select for the button?

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard