Patch(
EOS_Downtime_Schchg,
ThisItem,
{
Date: DTG_Date.SelectedDate,
Shift: If(
IsBlank(DTG_Shift.Selected),
{Value: DTG_Shift.SearchText},
DTG_Shift.Selected
),
Type_: If(
IsBlank(DTG_Type.Selected),
{Value: DTG_Type.SearchText},
DTG_Type.Selected
),
Reason: If(
IsBlank(DTG_Reason.Selected),
{Value: DTG_Reason.SearchText},
DTG_Reason.Selected
),
Source: If(
IsBlank(DTG_Source.Selected),
{Value: DTG_Source.SearchText},
DTG_Source.Selected
),
Part_Number: DTG_PartNumber.Text,
Minutes: Value(DTG_Minutes.Text),
Comments: DTG_Comments.Text
}
);
UpdateContext({EditMe: false})