cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RettFaulkner
New Member

Syntax Error for Date Field. Help!

I'm trying to patch a new line from my Power App to a Sharepoint list. Particularly a date column. I get the following error:

 

"The type of this argument 'Date' does not match the expected type 'Date'. Found type: Record"

 

Here is what I have setup for the submit button:

 

Patch('Burn Status', Defaults('Burn Status'),

{Title: Label1.Text, Date: {Value:DatePicker1.selected.value}, BurnStatus: {Value:Dropdown1.Selected.Value}})

; Navigate(CompleteScreen, Fade)

 

Now this USED to work when the Date: was set to Now() as opposed to {Value:DatePicker1.selected.value}. I don't want today's date patched, I need it to be the date that's selected with the picker. I don't get the syntax error if the Now() was working just fine. Isn't it a date record either way?

 

The column in Sharepoint is set to Date and Time (I only need the date though).

 

Anyone know how to fix this?

1 ACCEPTED SOLUTION

Accepted Solutions

Ah right, you are using a date picker. Try:

 

Date: DatePicker1.SelectedDate

View solution in original post

3 REPLIES 3
BCLS776
Community Champion
Community Champion

By using the braces in this expression:

Date: {Value:DatePicker1.selected.value}

you are creating a record.

 

Try this instead:

Date: DatePicker1.selected.value

 

 

I get the same error with this, although instead of found type:record it now says found type: error

Ah right, you are using a date picker. Try:

 

Date: DatePicker1.SelectedDate

View solution in original post

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,503)