Need help.
Below is my patch code. Seems has no issue but it shows error. The sharepoint list is a choice type. Not sure which part went wrong.

OnSelect =
Patch(
'Planned Leave Submission',
Defaults('Planned Leave Submission'),
{
LeaveStartDate: StartDateInput.SelectedDate,
LeaveEndDate: EndDateInput.SelectedDate,
LeaveType: LeaveDropDown.Selected.Value,
DayType: DayDropDown.Selected.Value
}
);
Navigate(SuccessfulPage, ScreenTransition.Fade)