cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.

View solution in original post

3 REPLIES 3
Dual Super User
Dual 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.

View solution in original post

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 377 members 6,273 guests
Please welcome our newest community members: