I want to increment the suffix of the last input of the field "Labornummer" (text field) by +1 in case of an activated toggle, so I did:
SubmitForm(Formular_AP_Messdaten);;
Set(
varNew;
With(
{
split: Split(
VorherigerFormularWert.Titel;
"/"
)
};
First(split).Value & "/" & With(
{
currValue: Value(Last(split).Value) + 1;
lastValue: Last(split).Value
};
Left(
lastValue;
Len(lastValue) - Len(currValue)
) & currValue
)
)
)
My form: OnSuccess
Set(VorherigerFormularWert;Formular_AP_Messdaten.LastSubmit);;NewForm(Formular_AP_Messdaten)
After hitting the submit button everthing works fine, but this increment-function should only works if a toogle is activated (else it should be submitted and the field should be cleared), so I changed the "Labornummer"-Default to:
If(varNew <> "" ; varNew;If(Formular_AP_Messdaten.Mode=FormMode.New && !IsBlank(VorherigerFormularWert) && Toggle_Merken.Value = true;VorherigerFormularWert.Titel;ThisItem.Titel))
Default Toogle
varToogle
the increment works and the "Labornummer", the results of pH, LF and AbsSt are submitted. but it doesn't matter if the toogle is activated or not, the "Labornummer"-field isn't going to be cleared/reset after submitting with an inactivated toogle. Please could you help me ...

Report
All responses (
Answers (