cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lsalo
Regular Visitor

Change items in order but keep same invoice id, that is autogenerated in Sharepoint List

I am building an app where I retrieve data from a Sharepoint list called ScannedOrders. I can select the order I want to prepare from a dropdown menu with the invoiceID. When I select the invoiceID, a gallery fills with the items that are included in the order.

In this app, I can change quantity of the items, add items, or delete items before processing the order. It also has a dropdown menu that changes the status of the order. When I press submit to change items in the Sharepoint list, it doesn't do it because cannot generate an InvoiceID since it is auto-generated (a combination of date and another column with client ID).

How would I go around it? I want to be bale to edit all items, add items to order, delete items and change status of order (EG: from 'Submitted" to "Ready") and keep same invoiceID.

Gallery with order is called itemsGallery

Here is the code I have on the "Submit" button OnSelect =>

 

ForAll(itemsGallery,Patch(ScannedOrders,{InvoiceID:DropdownInvoices.Selected.Result,StudentUtorID: UtorIDfield.Text, ExtScanner:ItemDescription.Text, Quantity:Quantity,WhoScanned: User().FullName,OrderStatus:DropdownNewStatus.Selected.Result, Item:Title}));

 

I get the following error:

the specified column is generated by the server and can't be specified

 

Thank you

 

NOTE:

When an item is edited in the Edit form, when press submit, it adds the item to the gallery instead of the list directly because I need to see all changes in the gallery before submitting final order

 

 

0 REPLIES 0

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,385)