Search code examples
apisharepoint-2013sharepoint-listformio

Is it possible to load Formio select list with SharePoint user names?


I have FormIO embedded in our SharePoint sites. The requirement now is that the select list needs to be populated with list of all the user names that have access to our SP site.

I am able to access all the user details via api, but the result returned is in XML format. The Select field only accepts JSON only. I am unable to find any information on how to convert xml to JSON while setting up FormIO select list Data.

Is there any guidance anyone can provide? Is it even possible to do this? (Note: We have more than 10,000 users in the list).


Solution

  • You can do this using the Select component, configured for the URL data source. You can then have the form select from a REST API provided from SharePoint which exposes some of the users within the site. If an API is not provided, then it will require you to build an API proxy to that data.

    Here are some examples which may be helpful.

    http://formio.github.io/formio.js/app/examples/externalload.html http://formio.github.io/formio.js/app/examples/external.html