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 / 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:
I have the same question (0)
  • 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 -DataSourceInfoDataSourceInformationColumnName )
    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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard