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 / Adding an item to a dr...
Power Apps
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:
I have the same question (0)
  • Infamous_Let Profile Picture
    330 on at
    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. 
  • CU06081219-0 Profile Picture
    8 on at
    Thank you, I have tried this but have an error
  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at
    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   
  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at
    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   

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