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

Notifications

Announcements

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)
  • WarrenBelz Profile Picture
    153,529 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

  • 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)

  • 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!

     

  • timl Profile Picture
    36,558 Super User 2025 Season 2 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

     

  • CU06111240-0 Profile Picture
    83 on at

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

     

    tchamb2_2-1712143978151.png

     

  • CU06111240-0 Profile Picture
    83 on at

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

     

    tchamb2_1-1712143932208.png

     

  • Verified answer
    WarrenBelz Profile Picture
    153,529 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

  • 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!

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 428

#2
WarrenBelz Profile Picture

WarrenBelz 374 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard