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 ,
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
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)
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!
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
I am still receiving an error message. I can not figure out, why.
I am still receiving an error message. I do not know why?
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
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!
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.