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 / Error during patch col...
Power Apps
Unanswered

Error during patch collection into a SQL SERVER table

(0) ShareShare
ReportReport
Posted on by

Hi,

 

Im making an app to register quality reports. Im using this video (https://www.youtube.com/watch?v=wI6SHGQ9ATg&) as a guide to create a editable grid table.

 

The problem is when im trying to patch my collection into my datasource, using a buttom with the following code:

 

 

//distribuicao -> my table in sql server
//colgrid -> collection

Patch(
 distribuicao/*;
 colgrid)
;;
Select(button_ClearCollect)
;;
Set(varGridEdit;!varGridEdit)

 

 

 

The error is showed when i run the app and try to change informations on a row.

finn_6_0-1649695243305.png

 

Additional information:

  • Im using Onpremise as a gateway to connect with my db;
  • Theres a PK registered on sssms with auto increment. The PK is not listed on the grid;
  • On the grid im using the following code OnSelect:

 

 

Patch(colgrid;
 ThisItem;
 {ID:Value(id_card_value.Text);
 SKU:sku_card_value.Text;
 Amostra:amostra_card_value.Text;
 Produto:produto_card_value;
 'Qtd Recebida':lote_card_value.Text;
 Reprovado:reprovado_card_value.Text;
 'Qtd Liberada':saldo_card_value.Text}
)

 

 

 

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard