Forum Discussion
REST API bug when retrieving managed metadata list field configured to allow single values?
- Oct 18, 2017
Hi Joel,
This is a well-known issue since 2013.
Single-valued MMD columns just can be retrieved as desired with OData, with Multi-valued MMD columns it is much better.
But there is a workaround. There is a possibility of getting single-valued MMD columns' values while items request if do it with `getItemsByCAMLQuery` list's method. It's a part of REST API, is an implementation for backward compatibility. The downside of the approach is that OData configurators like ($select, $filter, $expand and so on) can't be used together with OData.
--
Regards,
Andrew
I have now gave up and used JSOM to load the data...although I would still like to hear suggestions if you have come across this scenario before.
In case you are working with SPFx web parts and need to use JSOM for some reason (REST is the recommended approach and I trust everyone will understand why), this article provides excellent guidance on how to quickly setup everything and get started
Joel