web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Edit a galley selected...
Power Apps
Answered

Edit a galley selected item

(0) ShareShare
ReportReport
Posted on by 83

Help!!! I am trying to use the patch formula to edit a record. This is the formula I tried using. My record is gallery 2. What am I doing wrong?

 

Patch('Conditioning Tool',Gallery2,{'PO number':DataCardValue11.Text,'Item number':DataCardValue4.Text,'Case quantity':DataCardValue20.text,'Dry matter %':DataCardValue7.Text,'Average Shore value'.text:DataCardKey6.Text});
Refresh('Conditioning Tool');
Navigate(Gallery2, ScreenTransition.None)

tchamb2_0-1712141149780.png

 

Categories:
I have the same question (0)
  • Verified answer
    Ramanachiappan Profile Picture
    179 Moderator on at

    Hi  @tchamb2,


    Try this one,

     

     

     

     

    Patch('Conditioning Tool', 
    {ID:Gallery2.Selected.ID}, 
    {'PO number':DataCardValue11.Text, 
    'Item number':DataCardValue4.Text, 
    'Case quantity':DataCardValue20.text, 
    'Dry matter %':DataCardValue7.Text, 
    'Average Shore value':DataCardKey6.Text
    } 
    ); Refresh('Conditioning Tool'); 

     

     

     

     

     

    Best regards, 
    Ramanachiappan M

     

    If my response was helpful, please select "Accept as solution" to close the item. Your thumbs up would be highly appreciated if you found it useful. Thank you!

     

  • Verified answer
    WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @tchamb2 ,

     

    Patch(
     'Conditioning Tool',
     Gallery2.Selected,
     {
     'PO number': DataCardValue11.Text,
     'Item number': DataCardValue4.Text,
     'Case quantity': DataCardValue20.Text,
     'Dry matter %': DataCardValue7.Text,
     'Average Shore value': DataCardKey6.Text
     }
    );
    Refresh('Conditioning Tool');

    You need Gallery2.Selected  - also you cannot Navigate to a gallery - it needs to be to a screen.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • CU06111240-0 Profile Picture
    83 on at

    I am still receiving an error message. I do not know why?

     

    tchamb2_1-1712143932208.png

     

  • CU06111240-0 Profile Picture
    83 on at

    I am still receiving an error message. I can not figure out, why.

     

    tchamb2_2-1712143978151.png

     

  • timl Profile Picture
    36,634 Super User 2026 Season 1 on at

    Hi @tchamb2 

    Power Apps is case sensitive so this error may be due to you referring to the Text property of DataCardValue20 with a lower case 't'. I'd suggest making sure that you spell Text with a capital T - hopefully that might help.

    DataCardValue20.Text

     

  • Ramanachiappan Profile Picture
    179 Moderator on at

     Hi @tchamb2 - @timl  is correct,

    Try This one,

    Patch('Conditioning Tool', 
    {ID:Gallery2.Selected.ID}, 
    {'PO number':DataCardValue11.Text, 
    'Item number':DataCardValue4.Text, 
    'Case quantity':DataCardValue20.Text, 
    'Dry matter %':DataCardValue7.Text, 
    'Average Shore value':DataCardKey6.Text
    } 
    ); Refresh('Conditioning Tool');

     

    Best regards, 
    Ramanachiappan M

     

    If my response was helpful, please select "Accept as solution" to close the item. Your thumbs up would be highly appreciated if you found it useful. Thank you!

     

  • CU06111240-0 Profile Picture
    83 on at

    Thanks. Now although the formula works it is not updating the information if I make change.

     

    Patch(
    'Conditioning Tool',
    Gallery2.Selected,
    {
    'PO number': DataCardValue11.Text,
    'Item number': DataCardValue4.Text,
    'Case quantity': DataCardValue20.Text,
    'Dry matter %': DataCardValue7.Text,
    'Average Shore value': DataCardKey6.Text
    }
    );
    Refresh('Conditioning Tool');Navigate(Gallery2,ScreenTransition.None)

  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    @tchamb2 ,

    You did not state your data source, but if SharePoint, try this

    Patch(
     'Conditioning Tool',
     {
     ID: Gallery2.Selected.ID,
     'PO number': DataCardValue11.Text,
     'Item number': DataCardValue4.Text,
     'Case quantity': DataCardValue20.Text,
     'Dry matter %': DataCardValue7.Text,
     'Average Shore value': DataCardKey6.Text
     }
    );
    Refresh('Conditioning Tool');
    Navigate(Gallery2,ScreenTransition.None)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard