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 / Resetting a glitched t...
Power Apps
Unanswered

Resetting a glitched types in studio

(0) ShareShare
ReportReport
Posted on by 487

Every now and then the studio gets stuck because I do some changes in the wrong order or something like that.

This causes a collection to seemingly become an error object, which basically scrambles everything in a cascade of errors because that collection affects a bunch of other elements and actions.  I cannot see the content of the error in the studio, seems the only hint that the type is no longer a collection is the error i can see in the added screenshot.

I can sift through all the errors and cut and paste the formulas until I eventually find the cause, but it takes more time than restarting the editor. This is pretty annoying and time consuming because it seems to happen fairly often, I'll appreciate any suggestions on how to avoid these glitches 🙂 

Screenshot:
I can't use clear() or anything because that is also returning an error because its expecting a table object.

image.png

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    Have you inadvertently defined colMasterScopeItems as something other than a Collection in the app?

     

    My only thought, given that it's giving you an invalid type error, is that maybe a Set function has defined that as a variable (of a different type instead), and it depends on how/when the app runs. That being said, it should be throwing errors everywhere that's referenced if it's defined differently.

    Set(colTest, Accounts);
    //Collect(colTest,Accounts);
    //Collect(colTest,{item: 1},{item: 2});
    Clear(colTest);

    If you put the above formula in, and start removing either the 1st or 2nd line, you'll see it handles the Clear function differently.

  • hjaf Profile Picture
    487 on at

    Yes, well actually i'm just doing changes to a formula in a gallery. the "calculation" triggers while i'm editing the formula while it is incomplete and able to produce an error. This causes a collection to become an error..


    If the Collect() or ClearCollect() fails then why put the error in the collection that it fails to collect? 😕 

    Attempting just create a new button to reset the collections with clear or clearcollect fails for the same reason:

    Type: errorType: error

    I can't make set work either, but the error is different:
    Does not matter if i use a string, number, table etc.Does not matter if i use a string, number, table etc.

    PS: It makes no difference if a string, table(), int ,existing collection as argument to the set(). 


    UpdateContext() works, but it does not change the clearcollect/clear, once the context is lost it falls back to the error type, it seems that it falls back before clearcollect or collect does its thing so it fails again, I don't know. I have wasted so much time on this, I guess I have to just accept restarting the app and save regularly to have versions I can revert back to 😞 

    The only alternative solution to reverting a previous version seems to comment or fix the formula that caused it, save and restart studio. But having to restart the studio like this is also fairly time consuming 😕 
    I have also found that editing the formula in vscode and paste the whole thing every time i change it may avoid this issue. 

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 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard