Concat(
combo_FY.SelectedItems,
'Fiscal Year',
", "
)
Concat(
combo_BU.SelectedItems,
Title,
", "
)
UpdateContext(
{
varRecord:
{
'Fiscal Year': combo_FY.Selected.'Fiscal Year',
'Period': combo_Period.Selected.Title,
'Business Unit': combo_BU.Selected.Title,
'Cost Center': Concat(combo_CC.SelectedItems, Title, ", "),
'G/L Account': Concat(cb_GL.SelectedItems, 'GL code', ", "),
Flag: 1
}
}
);
SubmitForm(NewForm);
NewForm(NewForm)
If(
IsError(
Patch(
'DataSource',
Self.LastSubmit,
{
'Fiscal Year': varRecord.'Fiscal Year',
'Period': varRecord.Period',
'Business Unit': varRecord.'Business Unit',
'Cost Center': varRecord.'Cost Center',
'G/L Account': varRecord.'G/L Account'
Flag: 1
}
)
);
Notify("Patch failed", NotificationType.Error),
Notify("Patch succeeded", NotificationType.Success)
);
// Prepare concatenated strings for multi-select combo boxes
Set(
varCostCenters,
Concat(combo_CC.SelectedItems, Title, ", ")
);
Set(
varGLAccounts,
Concat(cb_GL.SelectedItems, 'GL code', ", ")
);
// Patch a new record directly
Set(
varRecord,
Patch(
'DataSource',
Defaults('DataSource'),
{
'Fiscal Year': combo_FY.Selected.'Fiscal Year',
'Period': combo_Period.Selected.Title,
'Business Unit': combo_BU.Selected.Title,
'Cost Center': varCostCenters,
'G/L Account': varGLAccounts,
Flag: 1
}
)
);
// Check if patch succeeded
If(
!IsBlank(varRecord),
Notify("Patch succeeded", NotificationType.Success);
Navigate(HomeScreen, ScreenTransition.None),
Notify("Patch failed", NotificationType.Error)
);
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2