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 Apps
Unanswered

Last submit + 1

(0) ShareShare
ReportReport
Posted on by 4

Hello, I created an app to form batches automatically! However, every time I close the app the count restarts, how do I make it continue?

I use this forms:

OnStart: Set(ContagemSequencia; 0)

Batch form: Concatenate(
If(
DataCardValue3.Selected.Value = "Blancheado";
"B";
DataCardValue3.Selected.Value = "Raw";
"R";
""
);
Text(
Switch(
DataCardValue5.Selected.Value;
"Próprio";
1;
"Barter";
2;
"Compra";
3;
"Descarte";
4;
"GSR";
5;
0
);
"0"
) & Text(
ContagemSequencia;
"00000"
) & "/" & Switch(
DataCardValue23.Selected.Value;
"2023";
"23";
"2024";
"24";
""
)
)

Save form: SubmitForm(Form1);;
UpdateContext({ContagemSequencia: ContagemSequencia + 1});;
Navigate(Lançamentos);;

Categories:
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    @Diego_1 

     

    You would need to store that value in SharePoint or a text file or Dataverse, so that you could read it again in your App.OnStart or Visible property or your start screen.

     

    If you really need that sequence, then create some type of configuration List / Table / File to store it in. Patch that with the sequence every time you do your SubmitForm(), but use the Forms OnSuccess so that you only patch if it saved your data correctly.

     

    Then load that data into a Variable - ContagemSequencia in the App.OnStart. If it doesn't find the value, then set it to 0.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

  • Diego_1 Profile Picture
    4 on at

    My data is already being stored in SharePoint, but I can't check the latest release and add +1 to the count. I need to add the count in this part:
     & Text(ContagemSequencia;"00000")
    When the app is open, the count works correctly, but when it closes it restarts

     

  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    @Diego_1 

     

    Then you are stuck. If you cannot do it later on then I dont know how to help you. I explained how you would need to do it, you said you cannot.

     

    So you are stuck


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Diego_1 Profile Picture
    4 on at

    @FLMike I just don't know how to look for this information. I tried countless ways including GPT and I didn't find a formula that works by searching for the latest release efficiently.

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard