cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Canadiansal
Helper V
Helper V

Edit Records

I have an App with a Gallery and a Form Side by Side - on the same screen. Like this:

Canadiansal_0-1612752948473.png

Currently, when I select a record, I have the form display the selected record. The users edit the record and it creates a COPY in the SP list. So they do this for every record and hit 'Submit' every time. Typically, the gallery will have about 10 records. I have a flag in the Gallery that indicates when a record has been updated - based on a Collection linked to the 'Submit' button on the form.

 

Rather than editing and submitting one record at a time, is there a way that the users can edit multiple records directly in the Gallery (or somewhere else) and hit submit once? I know this has something to do with a Collection, but I am not sure how to work with my requirement that the edited record does not overwrite the original, it has to create a new record in the list. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@Canadiansal,

Based on the issue that you mentioned, do you want to edit multiple records at a time and save as new records?

Could you please share a bit more about the scenario?

I have a test on my side, please take a try as below.

In my scenario, I have a SP list to fill in the Gallery.

ggg.png

1).Add a blank Gallery and insert TextInput controls as you want.

2).Insert an edit icon and set the OnSelect as below:

Set(varEditMode,ThisItem.ID)

3).Set DisplayMode property of each TextInput as below:

If(varEditMode=ThisItem.ID,Edit,View)

4).Insert Checkbox and set OnCheck as below:

Collect(ColGallery,{Title:TextInput3.Text,Weather:TextInput4.Text,Activity:TextInput6.Text})

5).Add a Save button and set OnSelect as below:

ForAll(ColGallery,Patch(EditGallery,Defaults(EditGallery),{Title:Title,Weather:Weather,Activity:Activity}));Clear(ColGallery)

Every time after you click the edit icon, please remember to check the checkbox, it will collect all the items you want to save as new records into a collection. And then, you click the button to save the collection to the data source.

GIF007.gif

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

5 REPLIES 5
eka24
Super User
Super User

Follow this tutorial from Reza Dorrani

https://youtu.be/8I0Pt_8I6k8

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-qiaqi-msft
Community Support
Community Support

Hi@Canadiansal,

Based on the issue that you mentioned, do you want to edit multiple records at a time and save as new records?

Could you please share a bit more about the scenario?

I have a test on my side, please take a try as below.

In my scenario, I have a SP list to fill in the Gallery.

ggg.png

1).Add a blank Gallery and insert TextInput controls as you want.

2).Insert an edit icon and set the OnSelect as below:

Set(varEditMode,ThisItem.ID)

3).Set DisplayMode property of each TextInput as below:

If(varEditMode=ThisItem.ID,Edit,View)

4).Insert Checkbox and set OnCheck as below:

Collect(ColGallery,{Title:TextInput3.Text,Weather:TextInput4.Text,Activity:TextInput6.Text})

5).Add a Save button and set OnSelect as below:

ForAll(ColGallery,Patch(EditGallery,Defaults(EditGallery),{Title:Title,Weather:Weather,Activity:Activity}));Clear(ColGallery)

Every time after you click the edit icon, please remember to check the checkbox, it will collect all the items you want to save as new records into a collection. And then, you click the button to save the collection to the data source.

GIF007.gif

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

Thank you - this looks like it might work. I am not sure how to populate the Blank Gallery. What values do I need to set for the TextBox?

Canadiansal_0-1612839978169.png

 

Hi@Canadiansal,

You just need to populate the TextInput with the SP list.

Set the first TextInput Default property:

ThisItem.Column1

Repeat the above formula for the left TextInput to display other column values.

Regards,

Qi

Best Regards,
Qi
Canadiansal
Helper V
Helper V

Do I need to set any other property in the Galery. Still getting erors.

Canadiansal_0-1612843393479.png

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,365)