web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Increment by activated...
Power Apps
Unanswered

Increment by activated toogle

(0) ShareShare
ReportReport
Posted on by 57

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

 

AndreasHoeppi_0-1691412408963.png

 

AndreasHoeppi_1-1691412422511.png

 

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 ...

 

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard