Hi everyone,
I came across 2-3 topics about this issue but solutions were based either on luck or vague understanding.
So please, enlighten me.
I'm trying to combine a patch within an If statement within a SWITCH statement however it looks like it is not allowed.
Switch(
_CurrentStep;
5;
NewForm(form_1) && UpdateContext({_showForm_1: true});
2;
If(
DataCardValue_retour.SelectedText.Value = "Oui";
And(
UpdateContext({_StepID: _CurrentStep + 1});
UpdateContext(
{
_StepValue: LookUp(
'SPlist1';
ID = _CurrentStep + 1;
Title
)
}
);
SubmitForm(Form2);
Refresh('SPlist1')
);
Patch('SPlist1';_Regtraite;{Complete:true})
);
UpdateContext({_StepID: _CurrentStep + 1}) && UpdateContext(
{
_StepValue: LookUp(
'SPlist1';
ID = _CurrentStep + 1;
Title
)
}
) && SubmitForm(Form2) && Refresh('SPlist1')
)
If I replace the line Patch('SPlist1';_Regtraite;{Complete:true}) with "" it works well so I guess the issue comes from the patch function within an if statement.
- This code is put in the Onselect of a button
- all the variables start with a "_"
- I've tried the Patch line alone in another button, it works fine also.
If you are able to help, thanks a lot !