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

List Screen gallery list add new row for input data

Hello, I am using list screen where in gallery list I need to add new row for user inputs when save button is pressed on previous row. I include screen shot of row. I dont know how to make that when save is pressed that all text input fields, dropdown fields and other input fields get recreated for new data to be inserted. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
shailendra74
Level 10

Re: List Screen gallery list add new row for input data

HI @Justas 

 

onVisible of Screen, create a collection:

 

ClearCollect(collPatients, Filter('[...]', Booking_ID = Booking_ID_Var))

 

set collPatients as Items property of gallery.

 

To create a new record/line you can write:

 

collect(collPatients,{})

 

Thanks.

 

 

 

View solution in original post

4 REPLIES 4
shailendra74
Level 10

Re: List Screen gallery list add new row for input data

Hi @Justas 

 

You can set the Items property of a gallery to some collection (collSample). onselect of save button:

 

  1. Patch(collSample, Defaults(collSample), {FIELD1: value, FIELD2: value2}) // this would add the values entered in the controls
  2. collect(collSample,{}) // this would add blank record with controls defined in the gallery

 

So onSelect of Save button, you should have:

 

Patch(collSample, Defaults(collSample), {FIELD1: value, FIELD2: value2});
collect(collSample,{}) 

Thanks:

Justas
Level: Powered On

Re: List Screen gallery list add new row for input data

In Gallery I am using filtering from database and it doesnt want to accept the new line. I attach screen shot.

shailendra74
Level 10

Re: List Screen gallery list add new row for input data

HI @Justas 

 

onVisible of Screen, create a collection:

 

ClearCollect(collPatients, Filter('[...]', Booking_ID = Booking_ID_Var))

 

set collPatients as Items property of gallery.

 

To create a new record/line you can write:

 

collect(collPatients,{})

 

Thanks.

 

 

 

View solution in original post

Justas
Level: Powered On

Re: List Screen gallery list add new row for input data

I am getting data from database, but when i try to save it it doesnt save inputs inside of database, I am using flow to save data in the database.

Helpful resources

Announcements
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

Top Kudoed Authors
Users Online
Currently online: 106 members 3,393 guests
Please welcome our newest community members: