cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

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
Highlighted
Anonymous
Not applicable

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

HI @Anonymous 

 

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
Highlighted
Anonymous
Not applicable

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

Hi @Anonymous 

 

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:

Highlighted
Anonymous
Not applicable

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.

Highlighted
Anonymous
Not applicable

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

HI @Anonymous 

 

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

Highlighted
Anonymous
Not applicable

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,280)