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
)
);
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2