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 / incremental counting i...
Power Apps
Unanswered

incremental counting in powerapps forms?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

I have the same question (0)
  • ScottDurow Profile Picture
    1,039 on at

    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"})
    );
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

    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
    Microsoft Employee on at

    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!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 514

#2
WarrenBelz Profile Picture

WarrenBelz 419 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 295

Last 30 days Overall leaderboard