Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 5soN6HugXuisdQ9HHjNZ0g
Power Apps - Building Power Apps
Unanswered

Auto Increment - In my Canvas PowerApp with SPO List, how to auto Increment Question Number?

Like (0) ShareShare
ReportReport
Posted on 17 Jan 2023 06:13:13 by 555

I Have a Canvas App with the screen shown as an attachment.

Currently, user submits his/her response for the selected Question Number from the dropdown and the description of the question underneath changes based on the selected Question Number. The response input gets submitted to a SPO list titled "Responses" against the selected question No.

There are total of Ten (10) Questions.

I have attached the screen shots of my screen and the Submit button code.

 

ISSUES:

The goal is to automate the process.

  • I do not want User to select the question Number. At each submit click the question number and the description should move to the next one. How do I auto increment the Question Number in a Text Box or in a Label Box, where User cannot change the question No. and then submit the his response for that question number via a Submit button?
  • This way User has to respond all the questions in order to be considered "Complete" for his/her review..
  • If User logs off in the middle of the Review Process, how can I assure that he/she continues from where the process is left off? (Is this done automatically by PowerApps?)

Any suggestion is appreciated.

Thank you,
SueA.

  • v-jefferni Profile Picture
    on 17 Jan 2023 at 08:17:26
    Re: Auto Increment - In my Canvas PowerApp with SPO List, how to auto Increment Question Number?

    Hi @SueA ,

     

    First of all, I think users will select a Bill from a Gallery. So, you can create a variable to save or initialize the question No. depending on the latest question No. If there is no question No. for that Bill, give it the original No: 1. Then on submit, you can use the UpdateContext function to add 1 for the variable, and the Text property of Question No Label should set to this variable. 

     

    Gallery OnSelect:

    Navigate(QusetionScreen, ScreenTransition.None, {varQuestionNo: If(IsBlank(LookUp(Responses, BillsID = galTitlesHome.Selected.ID && ReviewerID = varReviewerID.ID, QuestionNo)),1,LookUp(Responses, BillsID = galTitlesHome.Selected.ID && ReviewerID = varReviewerID.ID, QuestionNo)+1)})

    OnSelect of submit button:

    UpdateContext({varQuestionNo:varQuestionNo+1});If(varQuestionNo >10, YourOriginalCodes;Navigate(CompletedScreen), YourOriginalCodes)

     

    Best regards,

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 37 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 34

Overall leaderboard