cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AkshayManke
Continued Contributor
Continued Contributor

Showing UPN in the People Picket Field

Hi,

 

We are developing an application based on a shapreoint list where we have people column. I have two requirements.

 

1. When i am entering username, i am getting the 'display name' appeared. But I want that my UPN to be displayed. (e.g. Displayname: Akshay Manke, UPN: amanke). How to achieve this?

 

2. Once the name is entered in the above field, a display name should be shown in to a different Single line text field. How to get this?

 

Thanks and Regards,

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @AkshayManke :

In addition, I have an alternative:

I assume the person column do not allow multiple selections.

1\Add a text input control(TextInput1😞

2\Set the dropdown control's Items property to:

 

ForAll(Office365Users.SearchUser({searchTerm:TextInput1.Text}),{ 
  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
  DisplayName:DisplayName,
  Claims:"i:0#.f|membership|" & Mail,   
  Email:Mail,UPN:First(Split(Mail,"@")).Result
})

 

3\Set the Data card's(User_DataCard1) UpDate proeprty to:

 

First(DropColumns(Table(DataCardValue12.Selected),"UPN"))

 

1.JPG

2.gif

Best Regards,

Bof

View solution in original post

Hello @v-bofeng-msft,

 

Many Thanks for all your support. I used the below as combination of your suggested solution.

 

I have configured the below code in the field where i was needing the UPN. Just substracted the characters using mid formula. 

Mid(Upper(DataCardValue1.Selected.Claims),19,5)

 

Thanks a lot for your help @v-bofeng-msft.

 

Regards,

View solution in original post

10 REPLIES 10
v-bofeng-msft
Community Support
Community Support

Hi @AkshayManke :

Could you tell me:

Does UPN mean email address?

Does the GIF below demonstrate the function you need?

1.gif

If so,please try this solution:

1\add a combox(ComboBox2) and set it's lay out to Double

 1.JPG

Items

 

Choices(List1.User) /*List1 is my splist,User is my person column*/

 

DisplayFields

 

["DisplayName","Email"]

 

OnChange

 

Reset(TextInput5) /*TextInput5 is a textinput control*/

 

IsSearchable

 

true

 

2\Add a textinput control(TextInput5)

Default

 

ComboBox2.Selected.DisplayName

 

In addition,if UPN refers to the prefix name of the email address,  I’m afraid this can’t be done, the combo box control can only display the existing values.

Best Regards,

Bof

 

Hi @v-bofeng-msft , Thanks for the information.

 

I got a solution for the below point.

2. Once the name is entered in the above field, a display name should be shown in to a different Single line text field. How to get this?

Solution:  I have added DataCardValue(of other column).Selected.DisplayName in to the Default Value and i am getting the Display Name.

 

Now About the first question. Let me re-clarify it. As can be seen from the below image, I have a People Picker Field where you can see my DisplayName. But instead of display name i want to display my UPN (User Principle Name) like amanke. 

Snip UPN.JPG

 

 

 

What is UPN? You can see here: https://kb.iu.edu/d/atzp

 

Appreciate if you can help.

 

Thanks and Regards, 

Hi @AkshayManke :

UPN is not an existing field or value, you need to ntercept the part before the @ character in the Email field to get it.But a combo box can not display fields or values that do not exist.

As an alternative, I suggest you use the Email field.

Best Regards,

Bof

Hi @AkshayManke :

In addition, I have an alternative:

I assume the person column do not allow multiple selections.

1\Add a text input control(TextInput1😞

2\Set the dropdown control's Items property to:

 

ForAll(Office365Users.SearchUser({searchTerm:TextInput1.Text}),{ 
  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
  DisplayName:DisplayName,
  Claims:"i:0#.f|membership|" & Mail,   
  Email:Mail,UPN:First(Split(Mail,"@")).Result
})

 

3\Set the Data card's(User_DataCard1) UpDate proeprty to:

 

First(DropColumns(Table(DataCardValue12.Selected),"UPN"))

 

1.JPG

2.gif

Best Regards,

Bof

View solution in original post

Thanks @v-bofeng-msft, I will try this and will get back with the results.

Regards,

Hi @v-bofeng-msft, A different question. How do you create the gif's to upload to this forums? Any specific tool you use? Can i create it in Windows 10 Ent, without using any third party tool?

 

Thanks in advance!

Hi @AkshayManke :

I am using "ScreenToGif", you should be able to download it for free in the Microsoft Store.

1.JPG

Best Regards,

Bof

Many Thanks @v-bofeng-msft , i will try it. 😊

Hi @AkshayManke :

Is there anything else I can help?
If the post helps, then please consider accept it as the solution to help others.Thanks
Best Regards,
Bof

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,093)