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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / saveData() not storing...
Power Apps
Unanswered

saveData() not storing image files locally for offline use

(0) ShareShare
ReportReport
Posted on by 418

Hi,

 

New to PowerApps development. 

 

I have an app that connects to a SQL Azzure DB.  The idea is that I want to connect to the DB once, cache the data and be able to use the app with all the data from the DB while offline.  I use SaveData() and LoadData() to do this.  Once cached and I go offline my app seems to store and access varChars(), Dates, etc correctly.  However, the images (saved as varBinary(MAX)), never show up in the app when offline.  

 

Thank you in advance for any help

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @samuelJ,

     

    Can you share your formula that set for the offline mode app?

     

    Regards,

    Mona

  • SJ-15052312-0 Profile Picture
    418 on at

    @v-monli-msft

     

    Please find below the code I am using, it is in the OnStart of my app.  I do want to emphasize this seems to be working for Varchars, Date & Times.  Once I initially load the data, I go offline and see all that data, just not the pictures, which are VarBinary(MAX).

     

    If(Connection.Connected, 
    //if it is connected clearCollect the collections and save the data locally
    ClearCollect(collectionOne, Filter('[dbo].[collectionOne]', conferenceId = varconferenceID));
    ClearCollect(collectionTwo, Filter('[dbo].[collectionTwo]', conferenceId = varconferenceID, isDisabled = false ));
    ClearCollect(collectionThree, Filter('[dbo].[collectionThree]', conferenceId = varconferenceID, isDisabled = false ));
    ClearCollect(collectionFour, Filter('[dbo].[collectionFour]', conferenceId = varconferenceID, isDisabled = false));
    ClearCollect(collectionFive, Filter('[dbo].[collectionFive]', conferenceId = varconferenceID, isDisabled = false));
    ClearCollect(collectionSix, Filter('[dbo].[collectionSix]', conferenceId = varconferenceID, isDisabled = false));
    ClearCollect(collectionSeven, Filter('[dbo].[collectionSeven]', conferenceId = varconferenceID));
    ClearCollect(collectionEight, Filter('[dbo].[collectionEight]', conferenceId = varconferenceID));
    ClearCollect(collectionNine, Filter('[dbo].[collectionNine]', conferenceId = varconferenceID));
    
    SaveData(collectionOne, "collectionOne");
    SaveData(collectionTwo, "collectionTwo");
    SaveData(collectionThree, "collectionThree");
    SaveData(collectionFour, "collectionFour");
    SaveData(collectionFive, "collectionFive");
    SaveData(collectionSix, "collectionSix");
    SaveData(collectionSeven, "collectionSeven");
    SaveData(collectionEight, "collectionEight"),
    
    //if the app is not connected, load what ever data is stored locally in the app
    
    Clear(collectionOne);
    Clear(collectionTwo);
    Clear(collectionThree);
    Clear(collectionFour);
    Clear(collectionFive);
    Clear(collectionSix);
    Clear(collectionSeven);
    Clear(collectionEight);
    
    LoadData(collectionOne, "collectionOne", true);
    LoadData(collectionTwo, "collectionTwo", true);
    LoadData(collectionThree, "collectionThree", true);
    LoadData(collectionFour, "collectionFour", true);
    LoadData(collectionFive, "collectionFive", true);
    LoadData(collectionSix, "collectionSix", true);
    LoadData(collectionSeven, "collectionSeven", true);
    LoadData(collectionEight, "collectionEight", true));

     

  • maikeru Profile Picture
    37 on at

    Hi @samuelJ 

     

    I am running into the same issue.

    Were you able to work something out?

     

    Best regards.

     

    Michael

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard