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
poweractivate
Community Champion
Community Champion

@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

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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