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
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!
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?
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'.
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"})
);
WarrenBelz
81
Most Valuable Professional
mmbr1606
53
Super User 2025 Season 1
Michael E. Gernaey
46
Super User 2025 Season 1