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 / Expected identifier Na...
Power Apps
Answered

Expected identifier Name error

(0) ShareShare
ReportReport
Posted on by 6
I have been trying to work around a code, but power app keeps on throwing error around it, essentially is a code that supposed to filter emails from a drop-down box. The code is as below:
 
// Step 1: Create a collection of distinct employee names
ClearCollect(
    TempDistinct,
    Distinct(
        Filter(AllRequests, Approver.Email = User().Email),
        Employee.DisplayName
    )
);
 
// Step 2: Rename the Result column to EmployeeName
ClearCollect(
    colEmployeeNames,
    RenameColumns(TempDistinct, "Result", "EmployeeName")
);
 
// Step 3: Sort the collection
ClearCollect(
    colSortedEmployeeNames,
    Sort(colEmployeeNames, EmployeeName, SortOrder.Ascending)
);
 
// Step 4: Add "All" to the collection at the beginning
ClearCollect(
    colSortedEmployeeNames,
    {EmployeeName: "All"}
);
Collect(
    colSortedEmployeeNames,
    Sort(colEmployeeNames, EmployeeName, Ascending)
);
 
 
Help with this will be appreciated. Thanks 
Categories:
I have the same question (0)
  • Verified answer
    MS.Ragavendar Profile Picture
    4,984 Super User 2025 Season 2 on at
     
    Try in the below format as shown.
     
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • KT-05050446-0 Profile Picture
    6 on at
    @MS.Ragavendar thank you for the code provided, but with the provided code, it means ill have to add an item for every item i have. 
     
    I have managed to resolve the issue by avoiding the result formula, instead done this:
     
    // Step 1: Create a collection of distinct employee names
    ClearCollect(
        colEmployeeNames,
        Sort(
            Distinct(
                Filter(AllRequests, Approver.Email = User().Email),
                Employee.DisplayName
            ),
            Value,
            SortOrder.Ascending
        )
    );
     
    // Step 2: Add "All" to the beginning of the collection
    ClearCollect(
        colEmployeeNamesWithAll,
        Table({ Value: "All" })
    );
    Collect(
        colEmployeeNamesWithAll,
        colEmployeeNames
    );

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard