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 / How do I find where a ...
Power Apps
Unanswered

How do I find where a Collection is created?

(3) ShareShare
ReportReport
Posted on by 24

Is there an easy way to find the place in an app where the Collection is created versus looking through each component?

Categories:
I have the same question (0)
  • Sienna Profile Picture
    1,532 on at

    Go to File -> Collection or View -> Collection

    col.png

  • dww1962 Profile Picture
    24 on at

    Yes, I know how to go look at the collection.  What I want to know is the place or action in the app the actually creates the collection via Collect, ClearCollect, etc. for example in an OnVisible action or OnSelect action.

  • Sienna Profile Picture
    1,532 on at

    ahh.. then answer is unfortunately no. 

  • DeeTronSEAM Profile Picture
    396 on at

    Some info for people struggling with "Where The Hell DID I create that collection"......

     

    First of all, vote for at least ONE of these two ideas/suggestions. 

     

    1) https://powerusers.microsoft.com/t5/Power-Apps-Ideas/How-do-I-find-where-a-Collection-is-created/idc-p/671162

     

    2) https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Show-all-references-to-a-collection/idc-p/671165

     

    The PApps team has them as Under Review but they seem to be stuck there.  More votes will get that moving, hopefully.

    Also, in the meantime, there are at least two workarounds/hacks for locating where a collection is defined (e.g. ClearCollect, Collect).

     

    I describe one method using a .zip export of the app in the aforementioned threads here (and I'm now pretty certain the person I should have given credit to for that trick is @TML , btw) :
    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/How-do-I-find-where-a-Collection-is-created/idc-p/426764/highlight/true#M28873

     

    But here is the newest method I've become aware of...and it may be the better way.. though still deciding on that....

    I.e. the "PowerAppps Review Tool" available here: https://github.com/microsoft/powerapps-tools#powerapps-review-tool

     

    It allows you to export an app as an MSApp file and see all your functions, and it highlights what formulas/properties have been changed from the PApps default values.  You can export the report as JSON or HTML.  This is easier than the export as .ZIP and extract method I described.

     

    Do be aware that the tool can APPEAR to hang (e.g. Not Responding) when you open your MSAPP file.   I.e. it can take SEVERAL minutes for the tool to chew through the app and generate the report.

     

    Here is an example screenshot of a report:

    ExamplePAppsRevToolReportSS.png

  • Community Power Platform Member Profile Picture
    on at

    My Work Around
    Instead of a collections I created Variable Tables. Happened by accident and they work. Stakeholders kept changing how they wanted things named, from lists to column names to lookup items. So I put everything in OnStart and can all be changed from there so none of my code breaks.
    example

    Set(varListName, 'ListName')

    There were only a few places in my app that I actually needed to create a collection. One is where I needed to add the "New" item selection to a combo box 
    For that I did

    ClearCollect(collectListName, varListName ); //Where varListName is created in OnStart from the SP list
    Collect(collectListName, { Title: "New", ID: 0 }

     

    Also if you need to use collections you can also assign a dummy variable like

    ClearCollect(collectListName, ListName ); Set(varCollectListName,Blank()))

    and that way you will always find the collection

     

    Hope that helps someone

  • DeeTronSEAM Profile Picture
    396 on at

    Thanks much, @CrashWave !  I especially like the idea of using the global var "tagging" to make it easier to locate collection creations.  PITA that we have to do such a workaround, but your technique is MUCH easier than doing the export/search technique to hunt collection instantiations.  That even extends to allow you to use it to record what/when the collection was modified.  E.g.

     

    ClearCollect(coll_ItemsRequiringCollectionUsage, 'dbo.MySQLViewName' );
    Set(global_var4coll_ItemsRequiringCollectionUsage
    , {"LocationModified : "App.OnStart Line 35", "TimeStampModified : Now()}
    );

     

    I'm pretty **bleep** certain you've sold me on that idea!

     

    As for using (global) table variables instead of collections, that's also a great idea....but I'm a bit more hesitant on using that as I've become (too?) comfortable with collections as my "data table" objects.  But, I'm seeing occasional weirdness with ClearCollect not always clearing (forcing me to now "belt&suspender" every ClearCollect by adding a preceding Clear). Perhaps that strangeness coupled with your suggestion is enough to force me to abandon collections going forward.  If you bump into any other "gotchas" or lessons-learned from using table vars instead of collections, it would be great to hear them.

     

    Thanks so much for sharing!

  • CCollins1 Profile Picture
    10 on at

    On the left side of the screen there is a magnifying glass icon (search) search your collection name and it will tell you where the collection is within your screens and etc.

  • LauraAT Profile Picture
    11 on at

    Thank you, it drove me mad.

  • Ari00017 Profile Picture
    20 on at

    You can find it using the Search icon on left side of the power apps pane.

  • James Dhanjal Profile Picture
    3 on at

    This is the answer that helped me! 

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