cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Canadiansal
Helper V
Helper V

Append Record

I have an app based on a Sharepoint list. 

What changes do I need to make so that edited records are not updated, but are append as new records?

I want the users to see all columns of my data, but only have the ability to edit a subset. And when they save the edits, it should not overwrite the original record - it should create a new record.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Canadiansal :

Please try this soltuion:

Set the combobox1's items property to:

Choices(YourSPList.'Level')

Set the combobox2's items property to:

Choices(YourSPList.'Assigned to')

 Set the Submit button's OnSelect property to:

Patch(YourSPList,Defaults(YourSPList),{Title:"xxxx",Level:Combobox1.Selected,'Assigned to':Combobox2.Selected})

In addition,I noticed that you seem to use editform control.If so,you can also set the Submit button's OnSlelct property to:

Patch(YourSPList,Defaults(YourSPList),YourEditForm.Updates)

Best Regards,

Bof

 

View solution in original post

3 REPLIES 3

@Canadiansal 

 

You must instead use the

Collect

 

function to add it as a new record.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...


Check if the above helps.

Canadiansal
Helper V
Helper V

I am not sure how to use the Collection in this scenario. I have done some more searching and it looks like the Patch Function does what I need to do. Here is a screenshot of what I have: 

Canadiansal_1-1607315219189.png

 

I am using the Textbox.Text in the Patch function and that works, but I am having an issue with the Dropdown - when I use DrpDwn.Selected.Value, I get an error. My Dropdown are of 2 types: A Choice and a Person. Appreciate your help.

v-bofeng-msft
Community Support
Community Support

Hi @Canadiansal :

Please try this soltuion:

Set the combobox1's items property to:

Choices(YourSPList.'Level')

Set the combobox2's items property to:

Choices(YourSPList.'Assigned to')

 Set the Submit button's OnSelect property to:

Patch(YourSPList,Defaults(YourSPList),{Title:"xxxx",Level:Combobox1.Selected,'Assigned to':Combobox2.Selected})

In addition,I noticed that you seem to use editform control.If so,you can also set the Submit button's OnSlelct property to:

Patch(YourSPList,Defaults(YourSPList),YourEditForm.Updates)

Best Regards,

Bof

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,675)