Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

Adding an item to a drop down list

(0) ShareShare
ReportReport
Posted on by 8
Hi,
I'm struggling with something really simple but I just keep getting errors. I have a power app with a drop down list to select a person in the team, the drop down list is linked to a sharepoint group. I want to add an option of "Unknown" without adding it to the sharepoint group. I've tried a few things in the code but nothing is working. The code for Items is:
 
Sort(
    ForAll(
        Filter(
            Office365Groups.ListGroupMembers("**sharepoint group**").value,
            Or(
            "@gmail.com" in mail,
            "@gmail.de" in mail
            )
        ),
        {
         Claims:"i:0#.f|membership|" & Lower(mail),
         Department: "",
         DisplayName: displayName,
         Email: mail,
         JobTitle: "",
         Picture: ""
        }
    ),
DisplayName)
 
What do I need to add to this code to make it work?
Thanks for any help
Categories:
  • WarrenBelz Profile Picture
    148,864 Most Valuable Professional on at
    Adding an item to a drop down list
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • WarrenBelz Profile Picture
    148,864 Most Valuable Professional on at
    Adding an item to a drop down list
    Firstly, you cannot use ListGroupMembers with a SharePoint Group - it needs to be an Office365 group, This should work with the Id of that group type. Please note in particular the Case sensitivity of displayName.
    Sort(
       Table(
          Filter(
             Office365Groups.ListGroupMembers("Office365GrpupId").value,
             Or(
                "@gmail.com" in mail,
                "@gmail.de" in mail
             )
          ),
          {
             displayName: "Unknown",
             mail: Blank()
          }
       ),
       displayName
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • CU06081219-0 Profile Picture
    8 on at
    Adding an item to a drop down list
    Thank you, I have tried this but have an error
  • Infamous_Let Profile Picture
    269 on at
    Adding an item to a drop down list
    To add an “Unknown” option without touching your SharePoint group, you just need to append a manual record to your list. The trick is using Table(...) & Table(...) to combine your existing results with the extra one you want.
     
    Sort(
        Table(
            ForAll(
                Filter(
                    Office365Groups.ListGroupMembers("**sharepoint group**").value,
                    Or(
                        "@gmail.com" in mail,
                        "@gmail.de" in mail
                    )
                ),
                {
                    Claims: "i:0#.f|membership|" & Lower(mail),
                    Department: "",
                    DisplayName: displayName,
                    Email: mail,
                    JobTitle: "",
                    Picture: ""
                }
            )
        ) & Table(
            {
                Claims: "",
                Department: "",
                DisplayName: "Unknown",
                Email: "",
                JobTitle: "",
                Picture: ""
            }
        ),
        DisplayName
    )

    This adds “Unknown” as another selectable option in the dropdown, and it’ll show up alphabetically. 

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

Featured topics