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 / Retrieve an informatio...
Power Apps
Answered

Retrieve an information about data source

(0) ShareShare
ReportReport
Posted on by 105

Hello community!
Is there a functionality, that allows me to retrieve some information about my data source in my canvas app?
I simply want to connect my Dataverse table and create a collection, that will show me my Column names (from that table, all of them) and add a new one Columns to the Collecion (using AddColumns ()  probably), so they will show me an extra info about my Columns:
1. Column Data Type
2. If Text, Show Max Length (of the column, not of the text that is stored)

Any help is appreciated

Categories:
  • v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @KK76875875 ,

     

    Please try below functions to get column names into a collection:

     

    // Collect the Dataverse table values
    ClearCollect(newcollectionname1,DataVersetablename);
    // Get the column headers
    Set(varColumnNames,Distinct(Ungroup(MatchAll(JSON(newcollectionname1,JSONFormat.IgnoreBinaryData&JSONFormat.IgnoreUnsupportedTypes),"([^""]+?)""\s*:").SubMatches,"SubMatches"),Value));
    //Collect results into a new collection
    ClearCollect(newcollection2,varColumnNames)

     

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • KK76875875 Profile Picture
    105 on at

    @v-wenjuan-msft 
    Hello thanks for your reply. But if I'm not wrong, this collection doesn't give me any info about columns type and length. Is there any way to do that?
    I need:
    Column names;

    Column types;

    Column length;

    So in the end I'll get a view like this, but also with Column length;

    Capture.PNG

    I found this function -DataSourceInfo( DataSource, Information, ColumnName )
    But it looks like it works only for 1 column but not for many at the same time ( e.g I have 100 columns in the table)

     

    I also found similar solution as was suggested - Is it possible to get all column names from a shar... - Power Platform Community (microsoft.com)

  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @KK76875875 ,

     

    Thanks for your information shared.

    I was aware of that there're column information in Dataverse table-->Columns view and I do tests to get them out.

    But unfortunately there seems no way to get help from here...

    Below are blogs I refer to make tests for your reference:

    How to Query Metadata in DataVerse/ Common Data Service using Power Automate - Debajit's Power Apps & Dynamics 365 Blog (debajmecrm.com)

    How to get Collection Column Names in Power Apps [From 3 Different Datasources] - SPGuides

     

    And I've tried DataSourceInfo() as well, there's no column type buried in it.

    Refer to this link to know more about it:

    DataSourceInfo function in Power Apps - Power Platform | Microsoft Learn

     

    I don't want to make a conclusion but seems like there's no way but to write the collection manually...

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard