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 / DataSourceInfo is invalid
Power Apps
Answered

DataSourceInfo is invalid

(0) ShareShare
ReportReport
Posted on by 15

I am facing same error for MaxLength . I have changed it to - DataSourceInfo([@Table1],MaxLength,"Id") , still I can see same error. Is there any other way to fix it?

Categories:
I have the same question (0)
  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @AzureLearner 

     

    The 3rd param is the column name

    DataSourceInfo function intellicense will let you pick specific column names

    Not all column types work

     

    Regards,

    Reza Dorrani

     

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

     

     

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

    Hi @AzureLearner ,

    The right syntax of DataSourceInfo function is :

    DataSourceInfoDataSourceInformationColumnName )

    The information shoule be the format like this:

    DataSourceInfo.DisplayName

    DataSourceInfo.MaxLength

    DataSourceInfo.MaxValue

    So, try this formula:

    DataSourceInfo([@Table1],DataSourceInfo.MaxLength,"Id")

    Here's a doc about this function for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datasourceinfo

     

     

  • AzureLearner Profile Picture
    15 on at

    @RezaDorrani @v-yutliu-msft :Thanks a lot!



     

  • robertb Profile Picture
    4 on at

    Workaround hack for the DataSourceInfo-always-true bug.

    1. Create a new Sharepoint list with 1 row

    2. Grant read permission only to the group you want to test

    3. Add a hidden Gallery control to your PowerApp that refers to your new list

    4. The Gallery will only load rows if the user has that permission, so use CountRows to test this.

     

    Robert.

  • Priyesh Profile Picture
    62 on at

    Hi, I assume MaxLength doesn't work well with CDS data source?

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard