web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error when trying to r...
Power Apps
Unanswered

Error when trying to retrieve data from the network - only on mobile App

(0) ShareShare
ReportReport
Posted on by 7
Hello,
 
I have a Canvas Power App that has a Data Verse data source. The app works perfectly as expected on desktop and while in the editor. The issue comes when i go to use the app in the mobile version.
 
The mobile version has offline capabilities enabled. I have set up the user groups for the app to have full access to all the tables used in the app, as well as the recommended offline privileges for Canvas App, Mobile offline profile, and Sync Error tables. I have also created a custom mobile offline profile.
 
I load the app, i use the first two pages of UI (which pulls in data from the tables, so i don't think it should be a permissions issue). The issue comes when I come to load a specific page that has a gallery on it.
 
Strangely I have two very similar pages - one that i create a new record and the other that you can edit past events. The edit past event one works properly but on the new record one i get the "Error when trying to retrieve data from the network" error.
 
I don't have any errors in the editor either, and once again to reiterate - the web version of the app works perfectly fine - it's just the mobile app.
 
Any suggestions of how to fix this would be appreciated!
 
Thanks,
Sarah
Categories:
I have the same question (0)
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    266 on at

    Hi,

    The issue you're encountering in the mobile version of your Canvas Power App with offline capabilities is likely tied to how offline data is being handled for the gallery in the "new record" page. Here are some steps to diagnose and resolve the problem:

    1. Check Offline Data for the Gallery

    • Problem: Offline-capable apps cache data locally, but if the gallery is trying to retrieve data directly from the server, it can cause the "Error when trying to retrieve data from the network" error.

    • Solution:

      • Ensure the data source for the gallery is using cached data in offline mode.
      • Use the LoadData and SaveData functions to cache the data for offline use.

      Example:

      OnStart:
      If(
      Connection.Connected,
      ClearCollect(localTable, DataSource),
      LoadData(localTable, "localTableCache", true)
      )

      Bind the gallery to localTable instead of DataSource.

    2. Verify Mobile Offline Profile

    • Ensure that the specific tables and fields used on the "new record" page are included in the Mobile Offline Profile. This includes:
      • Entities (Tables): Verify that all relevant entities are enabled for offline use.
      • Relationships: Ensure that related entities for lookup fields are also included.
      • Filters: Check if any filters in the offline profile are unintentionally excluding required records.

    3. Check for Delegation Issues

    • Problem: Some functions (e.g., Filter, Sort) may not be fully delegable, and if the dataset exceeds the delegation limit (default is 500 records), the gallery may not load data in mobile offline mode.

    • Solution:

      • Ensure all functions in the gallery's Items property are delegable.
      • Adjust delegation warnings in the editor and optimize queries.

      Example:

      Filter(
      DataSource,
      CreatedBy.UserId = CurrentUserId
      )

    4. Test with Smaller Data Sets

    • Temporarily reduce the amount of data in the table to test if the issue persists. This helps rule out performance or data volume issues in offline mode.

    5. Debug Offline Mode in Mobile App

    • Add a Label to your app to display the connection status:

      Connection.Connected
      • If it shows false, ensure the app is properly syncing the data for offline use.
    • Check for any Sync Errors:

      • Navigate to Settings > Sync Errors in the mobile app to identify if there are specific sync issues related to your app.

    6. Test with Logs

    • Add error logging in the app to capture details about the error on the gallery's data source.
      Example:

      OnVisible:
      Set(
      galleryError,
      IfError(
      ClearCollect(localTable, DataSource),
      "Error: " & Error.Message
      )
      )

      Display galleryError in a label to monitor any runtime errors.

    7. Consider Differences in Data Access Logic

    • Compare the logic between the "new record" and "edit past events" pages. If they both use the same table but one fails:
      • Check for any filters, lookups, or conditional logic that may behave differently in offline mode.

    8. Update Power Apps and Dataverse

    • Ensure the mobile Power Apps client and your Dataverse instance are updated to the latest versions. Sometimes, updates resolve unexpected bugs.
    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!
  • SarahClark2512 Profile Picture
    7 on at
    Hi,
     
    Thanks for the below. i ran through all the suggestions and none of them have particularly helped.
     
    I've done a bit of debugging and it seems like the issue might lie within a concatenate that happens within the app. i'm doing some more testing but will update if i find it.
     
    Is there any known issue with concatenate and offline mode?
  • Suggested answer
    SarahClark2512 Profile Picture
    7 on at
    The issue did indeed turn out to be within concatenation
     
    my code was 
    ForAll(
            collection1,
            Collect(
                collection2,
                Filter(
                    collection3,
                    Concatenate(
                        Column1.Column1,
                        "-",
                        Column2.Column2.Column
                    ) = collection1[@UniqueKey]
                )
            )
        )
    which was causing the table that collection2 was a copy of to not be able to be loaded into the mobile app.
     
    What got it working was making a column in the original table that did the concatenation within Dataverse and using that as the comparison.
     
    Again, strange that i needed to do that at all because i can't see anywhere that states that a concatenate shouldn't work natively in a mobile/mobile offline app
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard