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

Edit a selected item of a gallery

When I select an item of a gallery on the left of the screen, I show on the right half of the screen some more parameters of the selected item. I want to make one of this parameter (called "Implemented") editable for the selected item. 

 

I inserted:

  • text input: shows as default the gallery selected parameter (correctly) and the displayMode=If(Gallery.Selected.ID=EditRecord,DisplayMode.Edit,DisplayMode.View)
  • edit icon: with OnSelect=UpdateContext({EditRecord:Gallery.Selected.ID})
  • save icon: with OnSelect=UpdateContext({EditRecord: ""});Patch(Gallery.Selected,{ID:Gallery1.Selected.ID},{Implemented:TextInput.Text})

 

When I edit and then save the value, the value on the gallery and on the connected data is not updated. 

 

FYI I used as guide this video PowerApps Editable Grid - YouTube

 

How can I update the value written in the text input updated in my data?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @f4810 ,

 

It seems like you are trying to patch the gallery instead of your data source. Try changing your Patch statement to include the name for the data source:

 

Patch(DataSourceName,{ID:Gallery1.Selected.ID},{Implemented:TextInput.Text})

 

 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

4 REPLIES 4
BCBuizer
Super User
Super User

Hi @f4810 ,

 

It seems like you are trying to patch the gallery instead of your data source. Try changing your Patch statement to include the name for the data source:

 

Patch(DataSourceName,{ID:Gallery1.Selected.ID},{Implemented:TextInput.Text})

 

 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @BCBuizer ,

 

I receive as error in the save button for the OnSelect "Incompatible type. We can't evaluate your formula because the context variable types are incompatible with the types of values in other places in your app."

 

The parameter I'm trying to modify ("Implemented") is a text ("yes", "no", "n/a", as you may imagine)

BCBuizer
Super User
Super User

Hi @f4810 ,

 

Do you mean to say the Implemented column is a Choice type? To confirm, please check in the List Settings:

 

BCBuizer_0-1660214238287.png

 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @BCBuizer ,

 

Yes, it was choice type. I converted to single line text and now works! Thanks for the help!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (2,482)