web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 4XU4pgmcw+7Jm6ukhYbdGZ
Power Apps - Building Power Apps
Answered

The data source supplied to the function is invalid

Like (0) ShareShare
ReportReport
Posted on 2 May 2024 13:09:17 by 251

Could you please solve the issue "The data source supplied to the function is invalid". I decided to use Update () instead of Patch(), because "ErrorCodes"    and "CsErrorCodeCounts" are local collections.

 

 

ForAll(ErrorCodes,
 Update(
 CsErrorCodeCounts, //datasource
 LookUp( //record which must be modified
 CsErrorCodeCounts, 
 Code = Value
 ), 
 {Count: LookUp(CsErrorCodeCounts, Code = Value).Count + 1} //modification
 )
);

 

 

 

Categories:
  • Verified answer
    Prabhakar_S Profile Picture
    735 Moderator on 02 May 2024 at 13:23:39
    Re: The data source supplied to the function is invalid

    Hi @Aleksandra1 ,

     

    The error message "The data source supplied to the function is invalid" typically occurs when the data source referenced in your function is not correctly formatted or does not exist.

     

    Try this,

     

    ForAll(
    ErrorCodes,
    Update(
    CsErrorCodeCounts, // Data source
    LookUp(
    CsErrorCodeCounts,
    Code = ErrorCodes[@Value]
    ),
    {
    Count: LookUp(
    CsErrorCodeCounts,
    Code = ErrorCodes[@Value]
    ).Count + 1
    }
    )
    )

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2