I need some help........
I'm struggling with a patch function. I tried almost everything, but I keep on seeing red lines.
The field I try to patch is a datepicker. (datepDatum).
The SPO column is a date and time field.
The error massage I see are like this.
Invalid argument type (Control). A Text value is expected instead.
The type of this date argument does not match the expected Record type. Type Date found.
The Patch function only has invalid arguments
What I understand is that there is a conflict between Text and Datevalue. But how can I change this,
See picture below.
Thanks from the Netherlands
Steven
Solved! Go to Solution.
I made a quick test in my environment, trying to patch a date from a DatePicker control to a SharePoint "Date and time" field.
You should be able to use the formula below:
Patch(Sessies, ThisItem, {Datum: datepDatum.SelectedDate})
Just make sure that the date column in your SPO list is name "Datum" and that its data type is "Date and time".
Also, I see that you're using [;] instead of [,].
I don't speak Dutch but the Patch function doc below does not seem to mention this syntax. Are you sure that this is appropriate?
De functie Patch - Power Apps | Microsoft Docs
Please give a try with following formula:
Patch(Sessies;ThisItem; {Datum: DateValue(Text(datepDatum.SelectedDate,DateTimeFormat.ShortDate))})
Regards
Krishna Rachakonda
If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone. |
Sorry Krishna 😢
and this picture
Thanks for your quick replay.
Kind regards
Steven
I made a quick test in my environment, trying to patch a date from a DatePicker control to a SharePoint "Date and time" field.
You should be able to use the formula below:
Patch(Sessies, ThisItem, {Datum: datepDatum.SelectedDate})
Just make sure that the date column in your SPO list is name "Datum" and that its data type is "Date and time".
Also, I see that you're using [;] instead of [,].
I don't speak Dutch but the Patch function doc below does not seem to mention this syntax. Are you sure that this is appropriate?
De functie Patch - Power Apps | Microsoft Docs
Thanks. This solved my issue. In the Netherlands we use some different identifiers etc.
, is ; here.
Regards.
Steven
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |