If(
CountRows(Filter(colRowMonthData, 'Objective ID' = ThisItem.'Objective ID')) = 0,
// Add new record if it doesn't exist
Collect(
colRowMonthData,
AddColumns(
Gallery2_4.Selected,
IsChanged,
1,
UnitType,
If(
IsNumeric(VarJanYTD) && Text(ThisItem.Unit) <> "text" ,
1,
Text(ThisItem.Unit) = "text",
1,
IsBlank(VarJanYTD),
1,0
)
)
),
// Use Patch to update the record if it exists
Patch(
colRowMonthData,
LookUp(colRowMonthData, 'Objective ID' = ThisItem.'Objective ID'),
AddColumns(
Gallery2_4.Selected,
IsChanged,
1,
UnitType,
If(
IsNumeric(VarJanYTD) && Text(ThisItem.Unit) <> "text" ,
1,
Text(ThisItem.Unit) = "text",
1,
IsBlank(VarJanYTD),
1,0
)
)
)
);save button onselect: Set(
glbVarLoadingSpinner,
true
);
colMyTempObjective,
Filter(
Objectives,
'Objectives (Views)'.'My Objectives'
)
);
ForAll(
colRowMonthData As Alpha,
Patch(
Objectives,
LookUp(
Objectives,
'Objective ID' = Alpha.'Objective ID'
),
{
'Result jan': If(
Alpha.Unit <> Unit.text,
Value(Alpha.ResultJan.Text),
Blank()
),
'Result jan t': If(
Alpha.Unit = Unit.text,
Alpha.ResultJan.Text,
Blank()
),
'YTD jan': If(
Alpha.Unit <> Unit.text,
Value(Alpha.YTDJan.Text),
Blank()
),
'YTD jan t': If(
Alpha.Unit = Unit.text,
Alpha.YTDJan.Text,
Blank()

Report
All responses (
Answers (