SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-1547713%22%20slang%3D%22en-US%22%3EError%20due%20to%20language%20settings%20when%20using%20Flows%20to%20provision%20libraries%2Flists%20on%20SharePoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1547713%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20trying%20to%20use%20Flows%20to%20provision%20a%20list%20on%20SharePoint.%20Which%20is%20a%20handy%20method%20if%20you%20want%20to%20make%20a%20PowerApp%20available%20for%20another%20tenant%2C%20or%20for%20a%20client.%20When%20I%20was%20orienting%20how%20to%20do%20it%2C%20I%20found%20various%20sources%20that%20showed%20how%20to%20do%20that%20(excellent%20examples%20provided%20by%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F100312%22%20target%3D%22_blank%22%3E%40April%20Dunnam%3C%2FA%3E%26nbsp%3Band%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F122420%22%20target%3D%22_blank%22%3E%40Audrie%20Gordon%3C%2FA%3E%26nbsp%3B).%3C%2FP%3E%3CP%3EBut%20the%20flows%20caused%20an%20error%2C%20which%20I%20really%20had%20not%20expected%2C%20but%20was%20very%20trivial%3A%20the%20views%20that%20you%20use%20in%20a%20SPO%20list%20or%20library%20are%20translated%20into%20the%20language%20locale%20you%20are%20working%20in.%20So%20for%20example%2C%20the%20default%20view%20of%20a%20list%20is%20'All%20Items'%20in%20the%20English%20language%20locale%2C%20but%20it%20is%20%22All%3CSTRONG%3Ee%3C%2FSTRONG%3E%20Items%22%20in%20the%20Dutch%20locale!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConclusion%3A%20be%20aware%20of%20this%20effect%20(and%20offer%20a%20solution)%20if%20you%20are%20going%20to%20develop%20an%20App%20that%20requires%20a%20list%20or%20Library%20and%20deploy%20the%20App%20by%20packaging%20a%20flow%20with%20it%20to%20set%20up%20a%20list%20or%20library!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1547713%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1557301%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20due%20to%20language%20settings%20when%20using%20Flows%20to%20provision%20libraries%2Flists%20on%20SharePoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1557301%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F682613%22%20target%3D%22_blank%22%3E%40TuaRes-IT%3C%2FA%3E%26nbsp%3B%20%26nbsp%3BThis%20problem%20is%20throughout%20the%20SharePoint%20REST%20API.%26nbsp%3B%20For%20any%20collection%20object%2C%20be%20it%20Lists%20or%20Views%20or%20anything%20else%2C%20you%20get%20a%20choice%20of%20two%20methods%3A%26nbsp%3BgetByTitle()%2C%20which%20is%20dependent%20on%20the%20language%20of%20the%20user%2C%20and%20getByID%20or%20(%3CSPAN%3Eguid'%7Bguid%7D')%3C%2FSPAN%3E%2C%20which%20is%20not%20portable%20between%20sites.%26nbsp%3B%20It's%20a%20major%20flaw%20in%20that%20API%2C%20which%20has%20never%20been%20addressed%2C%20and%20the%20Graph%20API%20is%20better.%20It%20separates%20name%20and%20displayname%20better%20than%20the%20REST%20API.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New 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 @Audrie Gordon ).

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 (New 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.

@Martin Laplante  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!