1

I was trying to update a property on an existing SharePoint site column using the REST API.

I found some tutorials like this Stack exchange post or this blog.

They both have a __metadata property for the type -- SP.Field and SP.FieldText respectively.

{"__metadata":{
  "type":"????"
},
'RichText':true }

I tried those but received a message that the property RichText doesn't exist on the type. Looking at the information I could see about the column it is a Note type, so I tried some variations on SP.Note and SP.FieldNote but no dice.

I wasn't able to google on it because the words __metadata and type have so many other meanings that didn't lead anywhere.

Eventually I worked out SP.FieldMultiLineText is the required magic sauce in this specific case.

Is there some place I can find a listing of what all these magic terms for the different column types are?

0

These field types are the objects under SP namespace. Few types I know are:

SP.FieldCalculated
SP.FieldChoice
SP.FieldCurrency
SP.FieldDateTime
SP.FieldLookup
SP.FieldMultiChoice
SP.FieldMultiLineText
SP.FieldNumber
SP.FieldText
SP.FieldUrl
SP.FieldUser

You can find these at Microsoft documentation: SP namespace (sp.js)


Also, check this documentation which is really helpful when working with field using SharePoint REST API:

Fields REST API reference

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.