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 / Frustrating LoadData E...
Power Apps
Unanswered

Frustrating LoadData Error

(0) ShareShare
ReportReport
Posted on by 39

Hello,

 

I have an app that works offline and has been working for a long time now and now I wanted to make a few edits and as part of that, I wanted to load the data from the data saved in the phone into a new collection and I was calling it coltempdata as shown below. This code is what runs on app start and I get this frustrating error that says "The function "clear" has some invalid arguments" and "The function "LoadData" has some invalid arguments" which makes zero sense as there is another LoadData command right under this that works with no issues.

 

I also see this error sporadically "Collection has an empty schema. No columns will be accessible after this operation. Consider using an existing collection or writable data source with a known schema instead."

 

I am scratching my head for 2 days why I am getting this error and tried multiple things such as initializing a blank collect with 

a ClearCollect(colfullsurveytemp,Blank()); statement which them Powerapps somehow likes and stops throwing the error on LoadData. I have never initialized blank collections like this ever. 

 

Any one has any idea why PowerApps is angry on my loaddata into a new collection? 

 

testtest123test_0-1632119386529.png

 

 

Categories:
I have the same question (0)
  • Kosenurm Profile Picture
    802 on at

    @testtest123test 

     

    coltempdata is not a valid collection. Have you already created this collection and then made changes to the code?  If so, when you are creating coltempdata collection, it already exists so can't create it again.

     

    If so, go to File > Collections and delete the coltempdata in there. Then your code should not have an error.

  • testtest123test Profile Picture
    39 on at

    @Kosenurm , coltempdata wasn't created before. The code in the image is the first few lines of On App Start. I didnt follow what you meant by hve you already created thus collection? Isn't the collectionn supposed to be created when LoadData runs? The collectionn colpic is being loaded using loaddata function and I dont have it explicity created anywhere in the app.

     

    Also, deleting the coltempdata collection from File > Collections, I donn't see any delete option. Can you guide me?

  • Kosenurm Profile Picture
    802 on at

    @testtest123test 

    It is errorring as coltempdata is not referencing correctly. Where is this variable which you create OnLoad used in your app?

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    @testtest123test 

     

    Try this by Shane will help how is done  https://www.youtube.com/watch?v=NwbqdA9j8Ek

  • testtest123test Profile Picture
    39 on at

    Hi @Ramole ,

     

    Thanks for the video pointer. This is great for getting started with offline capability and this is where I started 1.5 years ago. 

     

    The error I am getting is more specific though. Never seen this happen before. Any idea what it's trying to tell?

  • testtest123test Profile Picture
    39 on at

    @Kosenurm 

     

    I am using the collection in app start like this:

    If(CountRows(colpic)> 0,
    RemoveIf(

    RenameColumns(

    coldata,

    "PrimaryID",

    "PID"),PID in

    Filter(coltempdata,Status = "Complete").PrimaryID)
    );

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @testtest123test :

    The Point is that he collection named "coltempdata" do not exist.

    There must be a definition statement about this collection in your App, for example:

    ClearCollect(coltempdata,[1,2,3])

    Before

    vbofengmsft_0-1632375622023.png

    After I add an other button and set it's OnSelect proerpty to:

    ClearCollect(coltempdata,[1,2,3]);SaveData(coltempdata,"saversults")

    vbofengmsft_1-1632375676378.png

    The error disappeared.

    Best Regards,

    bof

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard