cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Justas
Frequent Visitor

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 Solution Sage
Solution Sage

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 Solution Sage
Solution Sage

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
Frequent Visitor

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 Solution Sage
Solution Sage

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
Frequent Visitor

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,744)