Please specify what version of the library you are using: [ latest]
Please specify what version(s) of SharePoint you are targeting: [ Online]
I am working with Microsoft Lists, and my goal is to retrieve all lists of a same template. In my current scenario all lists of type "Issue Tracker". How could I write my query to only selectthat specific template?
I hope this is the right place to ask. I already did an attempt on twitter (#SPhelp) but no luck:
https://twitter.com/Path2SharePoint/status/1301979624310583296
With classic SharePoint lists, I could use the BaseTemplate property to pick the proper template. With Microsoft Lists however, it seems that all lists have the same value for BaseTemplate (custom list, 100).
Retrieve the list properties on a Microsoft list built from the "Issue Tracker" template:
_api/web/lists/getbytitle('listName')
Thank you for your feedback!
It's unlikely this information exposed via API or even ever stored. My guess is that a site script is used while a list creation (Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.ExecuteTemplateScript() method) with a payload which contains whole definition for a new list.
Thanks for the reply. It makes sense that site scripts are used behind the scene. Sadly that leaves us with bland lists that look all the same (seen through the REST API) and use the same "System" content type.
I am still hoping that there's a way to tell those templates apart. My only idea for now is to filter based on the field names (in my case I would look for the IssueSource field), but I am still hoping we can do better!
I raised the question with the Microsoft dev team this week. They are acknowledging the issue and working on improvements, hopefully we'll get an update soon.
For now their only suggestion is to work with views. For example to target the Issue Tracker template, you could retrieve all views called "Issues grouped by status".