I am currently using IfError to do error handling with patch functions within my application. I have a submit function like this which works as expected:
IfError(
Patch(
'SP List',
Defaults('SP List'),
{
...
}
),
UpdateContext({showError: true}),
Patch(
'SP List 2',
Defaults('SP List 2'),
{
...
}
),
UpdateContext({showError: true}),
...
)
However if I then nest that IfError function in an if statement then the IfError then complains about invalid arguments. Like this:
If(
condition,
IfError( ... ), <--- error here now
some other action
);
I need to be able to only run the update if the conditions are true. However I can't get it to work with if or switch.