cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
golabem
Level: Powered On

Dynamically create table rows inside a form

Hello

 

Is there a way to dynamically create rows of table inside form, based on how many rows user want to add, and then collect data from them ? Generally I want to create something like table in attachment: 

User should be able to type his data in the first, blank row, and then by clicking +, the row should be added and sum up below. This table would connect to list from sharepoint only to get drop down list of role rates ( price per hour ). 

 

Thanks for all your help and hints

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dynamically create table rows inside a form

Hi @golabem ,

Do you want to display multiple records and make them editable in one screen?

I suggest you try gallery control and customize it.

Please note you could only update new records to collection, you could not modify an existing record of a collection.

I've made a similar test for your reference:

1)create a collection:

ClearCollect(a,{id:1,field1:"",field2:"",sum:""})

2)insert a blank gallery and customize it.

Set the gallery's Items: a

click the pen icon inside the gallery and then insert 3 labels, two textinput.8121.PNG

Set textinput1's Default: ThisItem.field1

Set textinput2's Default: ThisItem.field2

Set label1's Text:"field1:"

Set label2's Text:"field2:"

Set label3's Text: "sum:"&Value(TextInput1.Text)+Value(TextInput2.Text)

Set the arrow button's OnSelect: 

Collect(a,{field1:TextInput1.Text,field2:TextInput2.Text});Reset(TextInput1);Reset(TextInput2)

 

3)insert 4 labels below the gallery

Set label4's Text:"field1sum:"

Set label5's Text:Sum(a,field1)

Set label6's Text:"field2sum:"

Set label7's Text:Sum(a,field2)

 

Then you could enter data in the gallery and click the arrow button your collection will update, the sum label will diaplay sum value.8122.PNG

 

 

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Dynamically create table rows inside a form

Hi @golabem 

 

There is a way you can do this using galleries in PowerApps. I have created this blog post around dyamic elements for galleries and this should help you. 

https://www.appliedis.com/how-to-use-galleries-in-powerapps/

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: Dynamically create table rows inside a form

Hi @golabem ,

Do you want to display multiple records and make them editable in one screen?

I suggest you try gallery control and customize it.

Please note you could only update new records to collection, you could not modify an existing record of a collection.

I've made a similar test for your reference:

1)create a collection:

ClearCollect(a,{id:1,field1:"",field2:"",sum:""})

2)insert a blank gallery and customize it.

Set the gallery's Items: a

click the pen icon inside the gallery and then insert 3 labels, two textinput.8121.PNG

Set textinput1's Default: ThisItem.field1

Set textinput2's Default: ThisItem.field2

Set label1's Text:"field1:"

Set label2's Text:"field2:"

Set label3's Text: "sum:"&Value(TextInput1.Text)+Value(TextInput2.Text)

Set the arrow button's OnSelect: 

Collect(a,{field1:TextInput1.Text,field2:TextInput2.Text});Reset(TextInput1);Reset(TextInput2)

 

3)insert 4 labels below the gallery

Set label4's Text:"field1sum:"

Set label5's Text:Sum(a,field1)

Set label6's Text:"field2sum:"

Set label7's Text:Sum(a,field2)

 

Then you could enter data in the gallery and click the arrow button your collection will update, the sum label will diaplay sum value.8122.PNG

 

 

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
golabem
Level: Powered On

Re: Dynamically create table rows inside a form

Thank you for all your replies.

 

Do you know how to save each submited field values in seperatly sharepoint form?

I mean, atm, when I type some data in the text fields, and submit form, it is becoming applied to all  my submitted forms on my sharepoint list. I want to make it unique for each submitted form. 

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 299 members 4,521 guests
Please welcome our newest community members: