cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
keyboardWrench
Helper III
Helper III

Email String Read by Filter as Office365Users.UserProfileV2

Hi, 

 

I have an email column in SharePoint with data property as string will it be possible for my filter to read this as a Office365Users.UserProfileV2.  Goal is to show this as Display name in my drop down, is this even possible?

 

Any guides & ideas will be appreciated.

17 REPLIES 17
RandyHayes
Super User III
Super User III

@keyboardWrench 

Yes this is all possible.

However, having is selected in your dropdown will be a matter of matching against the Items property of your control.  If the Items are based on a Search of users, then you can use the UserProfileV2 as your default property.  Otherwise, you just have to match Items to Default.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes ,

 

Thanks for the response, could you provide a sample of this?

 

I am planning to have dropdown or combo box to have an "All' for my collection so that my Gallery will show all the Names in the rows.

 

I wonder if this solution is still achievable if I have emails string separated by ";". As column will have sometime 2 to 4 emails. Should I consider search box instead? 

@keyboardWrench 

Sorry for my delay on this.  Are you still having the question or have you resolved it?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes ,

 

I was able to separate the email string, how do I show this on my dropdown box as Office365 user display name?

 

Any inputs?

 

@keyboardWrench 

Sure thing - what is the Items property of your Dropdown?  (And is it a dropdown or a combobox?)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes , 

 

I am using a dropdown with items property of string.

 

Currently this are email address string which I also manage to separate multiple values with the delimiter ";" and applied distinct values.

 

 

@keyboardWrench 

I'm not entirely sure what you mean by the Items property is a string.  Items properties are always tables. They may be tables of strings, but they cannot be just a string.

 

So, I will assume perhaps that you have a table of strings of emails and will proceed with that.

 

Your formula (for example) would be the following on the Items property of the dropdown:

ForAll(
    ["email1@domain.com", "email2@domain.com", "email3@domain.com"],

    {Value: Office365Users.UserProfileV2(Value).displayname}
)

 

This would give you a dropdown with Display Names of the users.  However, each selection would now be the Display Name only (dropdownx.Selected.Value will be a Display Name).  If you still want the email address as well and simply want to display the name, then change formula to the following:

ForAll(
    ["email1@domain.com", "email2@domain.com", "email3@domain.com"],

    {Value: Office365Users.UserProfileV2(Value).displayname},
     Email: Value
)

 

Now dropdownx.Selected.Value will be the Display Name and dropdownx.Selected.Email will be the email.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes ,

 

Thanks for your reply, I should have added its a string collection. Sorry I forgot to mention this.

I cannot seem to make this work in my collection. 

 

ClearCollect(
      PersonDropDownColALL,
        PersonDropDownCol,
         ForAll(
          Filter(
           Distinct(
            Split(
             Concat(
              GalleryDataCol,
                Users & ";"
                        ),
                       ";"
                   ),
          Result
       ),
    !IsBlank(Result)
   ),
 ){Value: Office365Users.UserProfileV2(Value).displayname}
);

@keyboardWrench 

This is a bit convoluted.  Can you explain more about the purpose of this formula and the definitions of the PersonDropDownCol and the GalleryDataCol?

 

Are you trying to populate a dropdown with the display names of the users currently in a Gallery?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,243)