cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatheusRuiz
New Member

Edit Gallery (Excel) Item

Hello everyone!

 

- I have a screen(1) that shows some items in a Gallery that is filtered ("Action" column = "Not Finalized") from an Excel table.

 

- When I click on a Gallery item icon, I navigate to another screen(2) where a form is populated with the Gallery item data. Then I fill in other fields and send a new row to the Excel table.

 

What I want to do is:

  • After sending this new row, I want to edit the previous row (which was displaying in the Gallery). I want to edit only the "Action" column, in order to exclude this item from the Gallery view.

 

I tried to use (but it did not work):

  • After the Patch in the "send button" on the screen(2) - " ; Gallery1.Selected.Action = "Finalized"

 

Thanks in advance!

4 REPLIES 4
Drrickryp
Super User
Super User

@MatheusRuiz 

If your gallery is filtering the excel table directly, there should be no need as the edited item will not meet the criterion. If you are using a collection as the items for the gallery, you will need to use ClearCollect() to recreate the collection.

If you are using a form, SubmitForm() is the best way  to edit the data, not patch().

@Drrickryp 

- I am using an Excel table for the gallery items (screen 1).

- I am using a form (screen 2) to send a NEW row to the Excel table. In my case it is necessary to use Patch to send my form to the table. 

- After submitting the new row, I need to edit the item in the gallery (that is, I need to edit a column of a row in the table).

 

 

Drrickryp
Super User
Super User

@MatheusRuiz 

The same form can be used to edit items in your gallery.  It requires the gallery contain an icon with the OnSelect property

EditForm(yourform);

Navigate(formscreen)

and the Item property of the form should be  yourgallery.Selected

 

@Drrickryp 

I am sorry, I am not understanding how to apply this, but:

- My form was build with the Excel table as Data source, so how can I use it to edit an item in the gallery?

- Also, I want to edit the item when I click the "send button", after using the gallery's item data to send the new row. 

 

The gallery contains an icon with the OnSelect property as: 

Select(Parent) ; Navigate(Screen2)

And in the label of the form fields there is the Text property as: Gallery1.Selected.SomeColumn

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,434)