cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ikgray
Frequent Visitor

Invalid Argument Type. Expecting a number value

I am attempting to create a filter on a gallery.  There is a PIckupDate calendar picker, Ther is a ReturnDate calendar picker, and a VehicleType dropdown.  The PickupDate hits a Sharepoint List that has dates in it, and the Returndate hits the same list. VehicleType will hit another list that is in the same site.  When I filter by type I can get the type of vehicle to show in the gallery by using Filter(MD2018_Vehicle_Info,Vehicle_x0020_Type = TypeDropdown.Selected.Value). 

 

But when I try and filter the dates I get Invalid Argument Type. Expecting a number value.  I think it has something to do with the way the date coulums are formated (I have them set as date time).

 

Does anyone know how to format dates so that PowerApps will see the date as a number value?

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @ikgray,

 

How do you filter dates within the Gallery control of your PowerApps app? Could you please share a bit more about the formula?

Could you please show a bit more about the Date columns within your SP list? Are they Date only column?

Further, could you please show more details about the error message within your app?

 

I assume that the Date columns are Date Only type column in your SP list, is it true? I have made a test on my side and don't have the issue that you mentioned. Please take a try with the following workaround:

3.JPG

 Set the Items property of the Gallery control to the following formula:

 

Filter('20180615_case4',PickUpDate=Text(DatePicker1.SelectedDate,"[$-en-US]mm/dd/yyyy"))

Note: The '20180615_case4' is the SP list data source within my PowerApps app. The PickUpDate is a Date only type column in my SP list. The DatePicker1 represents the Date Picker control within my app.

 

 

Best regards,

Kris

 

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,997)