Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Unable to pass dates into flow from app button

(1) ShareShare
ReportReport
Posted on by 11
I am fairly new to Power Apps and Power Automate, but I am getting to grips with these tools. My simple requirement, is to launch a flow from a SharePoint page, via a button. I tried to launch the flow from the Call to Action web part, but I could not see a way to trigger the flow from it. So, I set about building a simple app to contain the date values and a button to launch the flow. The flow will then run against a list and find items that are between the start and end dates, gather them into a spreadsheet or CSV file and email them to the HR team for attention. However, one thing I simply cannot seem to do is to pass the three dates from my Power App, to the flow that is connected using the new V2 trigger in Power Automate.
 
Basically, I have built an app that contains three fields (StartDate, EndDate and RunDate). The first two are editable date pickers and the RunDate is the same, but view only and set to today's date. Then there is a button to launch the flow. I have verified that the flow works on its own, but I just need to trigger it with the app's button on the SharePoint page.
 
The problem I am having is with the OnSelect method syntax. My flow is titled PowerAppOTExtract, so in the formula bar, I started with: OnSelect=PowerAppOTExtract.Run(StartDate.SelectedDate,EndDate.SelectedDate,RunDate.SelectedDate)
The formula seemed to satisfy the built in validation.
 
I have attached a screenshot of what I am seeing when I try to run. For some reason, I am getting a mismatched data type, when both the app and flow trigger are set with date/time values. I tried to initialise some variables, but there was no date/time data type available in the drop-down, only Boolean, Integer, Float, String, Object or Array to choose from. I shouldn't need to create a variable, though, using the new V2 trigger, should I?
 
Any help, gratefully received,
Thanks 
  • Verified answer
    SmashedMonkey Profile Picture
    11 on at
    Unable to pass dates into flow from app button
    By way of an update. Using the peek code from the flow, I noticed that despite choosing a date field in the trigger, it seems to suggest that it is a string value?
    {
        "kind": "PowerAppV2",
        "inputs": {
            "schema": {
                "type": "object",
                "properties": {
                    "date": {
                        "title": "StartDate",
                        "type": "string",
                        "format": "date",
                        "x-ms-dynamically-added": true,
                        "description": "Please enter or select a date (YYYY-MM-DD)",
                        "x-ms-content-hint": "DATE"
                    },
                    "date_1": {
                        "title": "EndDate",
                        "type": "string",
                        "format": "date",
                        "x-ms-dynamically-added": true,
                        "description": "Please enter or select a date (YYYY-MM-DD)",
                        "x-ms-content-hint": "DATE"
                    },
                    "date_2": {
                        "title": "RunDate",
                        "type": "string",
                        "format": "date",
                        "x-ms-dynamically-added": true,
                        "description": "Please enter or select a date (YYYY-MM-DD)",
                        "x-ms-content-hint": "DATE"
                    }
                },
                "required": [
                    "date",
                    "date_1",
                    "date_2"
                ]
            }
        },
        "metadata": {
            "operationMetadataId": "d1500c35-5739-4930-80fc-5abdd39eaec7"
        }
    }
     

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,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,991 Most Valuable Professional

Leaderboard