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 / Unable to pass dates i...
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 
PA-FormulaError.png
Categories:
I have the same question (0)
  • Verified answer
    SmashedMonkey Profile Picture
    11 on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard