It's expecting date value but you have passed whole control object due to this you are getting the error.
Patch(
'Registre entrega Documentació',
Defaults('Registre entrega Documentació'),
{
ReservationID: Data_Hores.Selected.'Identificador (ID)',
Títol: text_SIUAC_1.Text,
Estat_petició: { Value: "En curs" },
SIUAC: text_SIUAC.Text,
Hora_recollida: Data_Hores.Selected.Hora_reserva,
data_recollida: Data_Hores.Selected.Data_disponible.SelectedDate,
HC_Pacient: text_HCPacient.Text,
Observacions: Text_observacions.Text,
Data_petició: Today()
}
);
Assuming the "Data_disponible" - This is date picker control. If it's Label or Text input then your formula like below:
Patch(
'Registre entrega Documentació',
Defaults('Registre entrega Documentació'),
{
ReservationID: Data_Hores.Selected.'Identificador (ID)',
Títol: text_SIUAC_1.Text,
Estat_petició: { Value: "En curs" },
SIUAC: text_SIUAC.Text,
Hora_recollida: Data_Hores.Selected.Hora_reserva,
data_recollida: If(IsBlank(Data_Hores.Selected.Data_disponible.Text), Blank(), Text(Data_Hores.Selected.Data_disponible.Text,"mm/dd/yyyy"),
HC_Pacient: text_HCPacient.Text,
Observacions: Text_observacions.Text,
Data_petició: Today()
}
);
//Data_Hores.Selected.Data_disponible.SelectedDate - Instead of this use Data_Hores.Selected.Data_disponible.Text if it's text type control
If(IsBlank(Data_Hores.Selected.Data_disponible.Text), Blank(), Text(Data_Hores.Selected.Data_disponible.Text,"mm/dd/yyyy")
If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
---------------------------------------------------------------------------------
📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.
✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.
💛 A Like always motivates me to keep contributing!