cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Help with patching a new record to a sharepoint list

Hi Everyone

I have a form that I am trying to patch a new record from, however the error I am getting is....  Update: The update that needs to be patched to be given record.

When I look at get help with this error, it is saying This type of argument,'Incidentstatus_x003a_' does not match the expected type'Record'. Found type 'Text.

This is a single form, connected to a sharepoint list.

Do I need to make a collection first?.... not sure?.

Below I have bold the item, the list is a choice field so I am not sure what I am doing wrong, any help would be appreciated.

 

Patch('Risk Incident Form',Defaults('Risk Incident Form'), {'Incident Status:':DataCardValue91.Selected.Value,'Description of incident:':DataCardValue98.Text,'Function lead email:':DataCardValue94,'Name of Leader who approved closure of incident:':DataCardValue2.Selected.Value,'Incident owner:': {Claims: Concatenate("i:0#.f |membership|",User().Email),Department: "",DisplayName: "",Email: User().Email, JobTitle: "", Picture: "",'Name of Leader who approved closure of incident:':DataCardValue2.Selected.Value, 'Closure date:': DataCardValue93.SelectedDate,'When did this incident happen?':DataCardValue96.SelectedDate,'When was this incident discovered?':DataCardValue97.SelectedDate,'Is this an isolated incident?': DataCardValue99.Selected.Value,'Type of incident:':DataCardValue101.Selected.Value,'Incident rating:':DataCardValue102.Selected.Value,'How many times has this incident occurred?':DataCardValue100.Text,'Primary cause category:':DataCardValue103.Selected.Value,'Number of customers impacted (if any):':DataCardValue3.Text,Impact:DataCardValue104.Selected.Value,'Financial Impact (if any):':DataCardValue108.Selected.Value,'Financial loss amount:':DataCardValue109.Text,'Financial gain amount:':DataCardValue110.Text,'Summary of cause: Root cause analysis:':DataCardValue105.Text,'Summary of cause: What contributed to the incident?':DataCardValue106.Text,'Actions taken to remediate:':DataCardValue111.Text,'Which controls failed?':DataCardValue112.Text,'What controls are needed to remediate future incidents?':DataCardValue113.Text,'Is a change to the risk register required?':DataCardValue200.Selected.Value,Attachments:DataCardValue116.Attachments,'What change is required to the risk register?':DataCardValue201.Selected.Value}

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Is 'Incident Status' a Choice field in your list? Try this

{
   'Incident Status':
   {Value:DataCardValue91.Selected.Value},
   'Description of incident:':DataCardValue98.Text,
   .........
}

 

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.

Hi @Anonymous ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,384)