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 / Name Isn't Valid Using...
Power Apps
Answered

Name Isn't Valid Using ClearCollect

(0) ShareShare
ReportReport
Posted on by 35

Guys - I have seen numerous postings out there concerning this issue, but none that are specific to my issue.

More specifically, I have two collections that I am working with: totalAgentsByMetro and totAgentsByMetroCount, referenced here below. Could it be an issue w/ the length of the collection name? I tried reducing it a few characters, and even that did not work.

 

Here is my code snipet that is returning the error: Name Isn't Valid...totalAgentsByMetroCount is not valid.

ClearCollect(totAgentsByMetroCount, AddColumns(totalAgentsByMetro,AgentCount, CountRows(Filter('Agents', MetroArea = totalAgentsByMetro[@Result])));
 
In addition, I created a separate ClearCollect whereas, I was able to create the collection and create a table with rows. But the above never works...more specifically when using AddColumns although no errors appear here. 
Categories:
I have the same question (0)
  • Verified answer
    RH-25092337-0 Profile Picture
    35 on at

    All - I figured the issue out myself. Simply needed to adjust the lines w/n the AddColumns. See below before and after. Issue was w/n the comparsion values and their respective placement w/n the code.

     

    - - -  BEFORE - - - 

    ClearCollect(totAgentsByMetroCount, AddColumns(totalAgentsByMetro,AgentCount, CountRows(Filter('VPS Agents',MetroArea=totalAgentsByMetro[@Result]))));
     

    - - - AFTER - - - 

    ClearCollect(totAgentsByMetroCount, AddColumns(totalAgentsByMetro,AgentCount, CountRows(Filter('VPS Agents',totalAgentsByMetro[@Result] in MetroArea))));

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