SOLVED

Error due to language settings when using Flows to provision libraries/lists on SharePoint

Copper Contributor

I was trying to use Flows to provision a list on SharePoint. Which is a handy method if you want to make a PowerApp available for another tenant, or for a client. When I was orienting how to do it, I found various sources that showed how to do that (excellent examples provided by  @April Dunnam and @AudrieGordon ).

But the flows caused an error, which I really had not expected, but was very trivial: the views that you use in a SPO list or library are translated into the language locale you are working in. So for example, the default view of a list is 'All Items' in the English language locale, but it is "Alle Items" in the Dutch locale!

 

Conclusion: be aware of this effect (and offer a solution) if you are going to develop an App that requires a list or Library and deploy the App by packaging a flow with it to set up a list or library!

 

2 Replies
best response confirmed by TuaRes-IT (Copper Contributor)
Solution

@TuaRes-IT   This problem is throughout the SharePoint REST API.  For any collection object, be it Lists or Views or anything else, you get a choice of two methods: getByTitle(), which is dependent on the language of the user, and getByID or (guid'{guid}'), which is not portable between sites.  It's a major flaw in that API, which has never been addressed, and the Graph API is better. It separates name and displayname better than the REST API.

@MartinLaplante  Thank you Martin!

 

And as I was reading your post, I saw a link to an exposé by @John Liu. As I see it, he proposes another way to add a new field of a list to a view: using the "AddToDefaultView'. Which, I guess, is 99% chance that it will be the "All items" view, whatever the language settings. Nice!

1 best response

Accepted Solutions
best response confirmed by TuaRes-IT (Copper Contributor)
Solution

@TuaRes-IT   This problem is throughout the SharePoint REST API.  For any collection object, be it Lists or Views or anything else, you get a choice of two methods: getByTitle(), which is dependent on the language of the user, and getByID or (guid'{guid}'), which is not portable between sites.  It's a major flaw in that API, which has never been addressed, and the Graph API is better. It separates name and displayname better than the REST API.

View solution in original post