cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
notj
Level: Powered On

Patch error: Does not match expected type "Date". Found type "text"

When doing the below on my forms OnSuccess, I'm getting an error.

The error on the StateCMSSurveyDate saying "Does not match expected type "Date". Found type "text"."

 

ForAll(SiteVisitCollection, Patch(SiteVisitDetails, Defaults(SiteVisitDetails), {StateCMSSurveyDate: collStateCMSSurveyDate, SurveyOutcome: collStateCMSSurveyDate, Title: Form3.LastSubmit.ID}))

 Can someone explain how I can provide it the information it wants?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Patch error: Does not match expected type "Date". Found type "text"

I suspect you are picking up a value stored in a colletion as text.  simply surround the text value with the datavalue() function to convert it to an actual date.

SurveyOutcome: DateValue(collStateCMSSurveyDate),


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Dual Super User
Dual Super User

Re: Patch error: Does not match expected type "Date". Found type "text"

I suspect you are picking up a value stored in a colletion as text.  simply surround the text value with the datavalue() function to convert it to an actual date.

SurveyOutcome: DateValue(collStateCMSSurveyDate),


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,922)