cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AJ_vizMan
Frequent Visitor

Unable to write data from Power apps to Share point list

Hi,

 

I am using Help Desk app with some modifications and using share point list as data source. 

Requirement is to write data from power app (filled by user) into share point list ( using SP list as data source).

 

One possible way is to use "Patch" function but, there are errors-

Patch(MassUploadTemplate,Defaults(MassUploadTemplate), {ID: Id, Category: Category, Priority: Priority}));

 

Error- 

The type of this argument 'Category' does not match the expected type 'Record'. Found type 'Error'.

Name isn't valid. This identifier isn't recognized.

The function ‘Patch’ has some invalid arguments.

 

Possible Reason - Category & Priority are  'choice' type fields and Patch function may not be recognizing the correct type. Is it correct? Are there any other options available?

 

Appreciate your time to help me resolve this. 

 

#PowerApps #SharePointListIntegration #Patch

7 REPLIES 7
Jacky_Shen
Resolver IV
Resolver IV

Hi @AJ_vizMan ,

 

Have you tried Category.Value and Priority.Value?

Hi @Jacky_Shen - Thank you for response. I tried to use Category.Value and Priority.Value but, still same error.

Is there any other thing to check? 

 

Patch_2.PNG

Well, if you are trying to create a new record in SharePoint through PowerApps, then I think you can consider to use submit form function. Otherwise, using patch function requires you to get the value for id, category and priority. One possible solution for category and priority might need to be modified to Category.Selected and Priority.Selected when you try to use patch function.

AJ_vizMan
Frequent Visitor

Hi @Jacky_Shen :  Thank you for response. Using Category.value and Priority.value in Patch function also doesn't solve the issue. I saw some videos on youtube and got to know that we need to have special treatment for choice columns. But, i am still to make it working for me.

 

Would you suggest anything that i can check in share point list? Or other suggestion..please 

WarrenBelz
Super User III
Super User III

Hi @AJ_vizMan ,

Assuming you are getting the values from drop-downs based on these Choice fields, you need something like this

Patch(
   MassUploadTemplate,
   Defaults(MassUploadTemplate), 
   {
      Category: {Value:YourCategoryDD.Selected.Value}, 
      Priority: {Value:YourPriorityDD.Selected.Value}
   )
)

You also do not need the ID as SharePoint creates this automatically.

 

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 @AJ_vizMan ,

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.

Hi, i got the solution. Sorry for late confirmation

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (15,233)