cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Patching Outlook NickName to an Excel File

We have a PowerApp where we are collecting the usage.  Right now it collection UserEmail, LoginDate, and LoginTime.   We wanted to add the UserID which is stored in the Outlook as the Alias (Nickname).   

 

The patch formula works on everything except the "MailNickname".   Does anyone have a work around or suggestion? 

 

Outlook_AliasIssue.png

7 REPLIES 7
Super User
Super User

Re: Patching Outlook NickName to an Excel File

@Anonymous 

Try Office365Users.MyProfileV2().mailNickname

Although your formula should work...IF there is a mailNickname in their Office 365 profile.

You mentioned Outlook - this formula gets the mailNickname from the Office365 profile.  If you are referring to Outlook contacts, that would be something different.

 

I hope this is helpful.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: Patching Outlook NickName to an Excel File

Hi @Anonymous ,

Could you please share a bit more about the issue within your app?

Do you mean that the myAliasVariable value could not be saved into your Excel table?

 

Firstly, please check if the myAliasVariable is populated with proper value within your app. In other words, please check if you have configured a value for the MailNickname property in your Office 365 profile.

 

In addition, please consider modify your formula as below:

Patch(
         'YourExcelTable',
          Defaults('YourExcelTable'),
          {
             UserName: Office365Users.MyProfile().MailNickname,
             UserEmail: User().Email,
             LoginDate: Today(),
             LoginTime: Now()
          }
)

Or

Patch(
         'YourExcelTable',
          Defaults('YourExcelTable'),
          {
             UserName: Office365Users.MyProfileV2().mailNickname,
             UserEmail: User().Email,
             LoginDate: Today(),
             LoginTime: Now()
          }
)

Please take a try with above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Patching Outlook NickName to an Excel File

@v-xida-msft , 

 

I have tried both solutions and neither worked for me.    We tried using the variable because when first trying the "Office365Users.MyProfile().MailNickname" formula it didn't work.    I've tested both the variable & the formula to the left in a label in a random spot on the app and they do show the Nickname data.  

 

Thanks!

Super User
Super User

Re: Patching Outlook NickName to an Excel File

@Anonymous 

You're not going to need a variable to test this...

Simply put a Label control on your screen to test and set the Text property to:

Office365Users.MyProfileV2().mailNickname

 

What does that show?  It should show the mailNickname.  If not, then there is some other factor (outside of PowerApps) that is a fault.

 

Try that first and make sure you get results.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Anonymous
Not applicable

Re: Patching Outlook NickName to an Excel File

@RandyHayes 

 

Yes, it works, for use the Nickname/alias = Our userIds. We would like to use in an analytics file.

 

  

Anonymous
Not applicable

Re: Patching Outlook NickName to an Excel File

We were able to get it to work by using the value stored in the label. 

 

Patch(
         'YourExcelTable',
          {
             UserName: Lbl_Nickname.Text,
             UserEmail: User().Email,
             LoginDate: Today(),
             LoginTime: Now()
          }
)

 

Community Support Team
Community Support Team

Re: Patching Outlook NickName to an Excel File

HI @Anonymous ,

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 191 members 4,621 guests
Recent signins:
Please welcome our newest community members: