cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
emikra
Level: Powered On

Value cannot be null

I am trying to add Site Columns to a Document Library using Flow.  I used "Send an HTTP request to SharePoint" to get the SchemaXML for the Site Column and then added the following to the body of the 2nd HTTP request to SharePoint:

 

" { "parameters": {
"__metadata": {
"type": "SP.XmlSchemaFieldCreationInformation"
},
"SchemaXml": "<Field Type=\"Choice\" DisplayName=\"Year\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" Format=\"Dropdown\" FillInChoice=\"FALSE\" Group=\"Custom Columns\" ID=\"{360b1d50-0501-4acb-818b-6ae0a9b8c3f2}\" SourceID=\"{36696368-8c89-4960-bfa6-b1b67965df09}\" StaticName=\"Year\" Name=\"Year\" Version=\"1\"><Default>2019</Default><CHOICES><CHOICE>2019</CHOICE><CHOICE>2020</CHOICE><CHOICE>2021</CHOICE></CHOICES></Field>"
}
}

"

1 ACCEPTED SOLUTION

Accepted Solutions
emikra
Level: Powered On

Re: Value cannot be null

I resolved this issue.  I had the wrong Headers, just needed accept and content-type.

View solution in original post

2 REPLIES 2
emikra
Level: Powered On

Re: Value cannot be null

I resolved this issue.  I had the wrong Headers, just needed accept and content-type.

View solution in original post

Community Support Team
Community Support Team

Re: Value cannot be null

 

Hi @emikra ,

 

Thanks so much for posting in the Flow Community! It appears that you have found a solution to your issue!

If so, please click "Accept as Solution" on the reply that describes how you were able to solve your issue!

This makes your post much easier for other members of the community to see and find when looking for a solution!

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,134)