Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

incremental counting in powerapps forms?

(0) ShareShare
ReportReport
Posted on by

Hi, has anyone got code for doing an incremental count within a powerapps form?

I am trying to code a add/remove function for users to e.g. add a guest's details to a form.

Repeating Tables is turning out to be very cumbersome, particularly saving data to SP.

So i'm trying to have 10 hidden rows that get 'shown' when the 'add guest' button is clicked. Hence the need for a count.

Any suggestions would be much appreciated,

Thank you

  • Community Power Platform Member Profile Picture
    on at
    Re: incremental counting in powerapps forms?

    Have not tried it yet Scott, willing to try.

    Do i create a row with the 3 input fields I need, then inside this add the 'Add guest' button?

    and on the 'Add guest' button property of 'onSelect' do i add the code you mentioned prior?

    Thanks in advance!

  • ScottDurow Profile Picture
    1,039 on at
    Re: incremental counting in powerapps forms?

    We were all new to Powerapps at one point!

    Normally you wouldn't have hidden rows - you would just use Collect to add rows as you need them - is this something you've tried?

  • Community Power Platform Member Profile Picture
    on at
    Re: incremental counting in powerapps forms?

    Hi Scott, I'm new to Powerapps so if you could please bear with me. 

    ms says 'Sequence' generates a single column table. I have existing rows that are not visible. my idea was to generate numbers i.e. when the user clicks on the 'Add guest' button that and global variable/index would increment to '1'. My first hidden field would have conditional visibility, only becoming visible when variable = '1'.

    and for 'remove guest' index would minus '1'.

  • ScottDurow Profile Picture
    1,039 on at
    Re: incremental counting in powerapps forms?

    You might want to look at Sequence - this would allow you to add an index to the new rows:

    Collect(colItems,
     ForAll(Sequence(10),{index:Value,name:"New Row"})
    );

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

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 - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 81 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 53 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 46 Super User 2025 Season 1

Overall leaderboard