Power Apps offline issue with Dataverse
Error - Tenor

Power Apps offline issue with Dataverse

The model driven Power Apps have offline capabilities out of the box. In canvas Power Apps on the other hand, you need to build it yourselves by creating local collections of the date. Fortunately, Microsoft provides basic instructions and there are some great blog articles on the internet that can help you to build an offline canvas app. In this article I’ll address the issue I recently got when doing that.

The issue

I made an app that works fine without internet connection. The issue was that the app still wanted to connect to Dataverse via an internet connection, even though I followed the guidelines from Microsoft and other great people that wrote about this on the internet. The error message was as follows:

The request was not sent or there was no answer from the server. Check the internet connection. Answer from server: Account failed: Something went wrong

Account is table in Dataverse. The error message could be referencing another table in Dataverse in your case. Mysteriously, the error message later changed to the following even less descriptive phrase:

Error when trying to retrieve data from the network

The reason

In the gallery item there was a column that tried to lookup another record that wasn’t in the local collection. Also, on the form there was a datacardvalue that was trying to get the Dataverse table to present the items. Even though it’s just the name of the record, it still needs to connect to Dataverse to fetch it. In opposite to an offline model driven app, that doesn’t need to go online to get the name of other record.

The solution

To solve this problem, you need to create another collection with the required records of the other table in Power Apps and try to find a way to link the collections together. This can get very complex, very fast. In my case I just needed the name and didn’t need the ability to change the lookup. So, I made a workaround by a creating a calculated text column in Dataverse that automatically gets the name of the record. I replaced the lookup column by this one and the “fake” error messages disappeared as snow in the sun.

The bonus

An extra bonus with my solution is that I can use this column to search on and sort by in the gallery, because it’s a text column.

要查看或添加评论,请登录

Timothy Bohte的更多文章

社区洞察

其他会员也浏览了