cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

6 REPLIES 6
Resolver III
Resolver III

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.

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 

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.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (22,341)