Dear @v-jefferni , many thanks for your kind reply.
yes the error was "there is a invalid argument in the ForAll"
It worked perfectly with your code
Hi @bkumar ,
Is it invalid argument type error? If so, the reason is within If statement, true and false results need to be with the same structure and data type. Please try and use Switch function instead:
ForAll(
ComboBox1_21.SelectedItems As a,
Switch(
IsBlank(
LookUp(
collectICSGBUBrands,
ICSPeriod = Dropdown2_58.Selected.Name And
ICSYear = Dropdown2_57.Selected.Name And
Name = ComboBox1_45.Selected.Value And
Entitiesmapping = Value(a.EntityCode)
)
),
true,
// If the condition is true, execute the Patch function to update the data source:
Patch(
ICSGBUBrands,
Defaults(ICSGBUBrands),
{
Name: Concatenate(ComboBox1_45.Selected.Value, "bhasker"),
Entitiesmapping: Value(a.EntityCode),
ICSYear: Dropdown2_57.Selected.Name,
ICSPeriod: Dropdown2_58.Selected.Name
}
),
false,
// If the condition is false, skip this iteration and move to the next element:
Collect(test123,a.EntityCode)
)
);
Best regards,
WarrenBelz
55
Most Valuable Professional
mmbr1606
42
Super User 2025 Season 1
Michael E. Gernaey
31
Super User 2025 Season 1