web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Icon visibility issue ...
Power Apps
Answered

Icon visibility issue on a screen

(0) ShareShare
ReportReport
Posted on by 319

Hi,

 

We have an approval icon on the home screen which the approver should see on the home screen when clicks on the app link he receives in a email triggered from Power apps. 

 

When we hardcoded the email address of the user in the Power apps code then we can see the icon but when user uses the link of the app then the icon is not visible.

 

 

Backend Screen with the icon when app ran as an impersonation of the user

Prathameshpatka_0-1656420536391.png

 

Screen with no icon when user clicks on the link :

 

Prathameshpatka_1-1656420644750.png

 

 

 

 

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    What is your app using to check this? User().Email? User().Email is actually the user's user principal name, not their primary smtp address. You can use the Office365Users connector to get the current user's primary smtp email address.

     

    I have this tip listed in my Power Apps Forms tips and tricks part 3 here

  • Prathameshpatka Profile Picture
    319 on at

    Hi @iAm_ManCat ,

     

    I did use the office365users.Myprofile().mail connector to get the email address instead of varcurrentuser in the below code but it still doesn't work unfortunately. varcurrentuser is defined as user().email which I did change to office365users.Myprofile().mail

     

    The top one ApproverNominationsAll collection itself is not getting any count which causes the second collection to also have no records.

     

    Prathameshpatka_0-1656558675664.png

     

     

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    As I said in the article, there are a number of issues to get past - firstly = is case sensitive so

    john@microsoft.com

    is NOT equal to

    John@microsoft.com

     

    So you need to wrap things in Lower() to make sure the comparisons are going to all be the same case.

     

    Then you also need to check both the UPN and Email, in case the value has been stored as either, so you made your varCurrentUser equal to the email, it should be Set( varCurrentUserEmail, Lower(office365users.Myprofile().mail)) and then you should also define Set( varCurrentUserUPN, Lower(office365users.Myprofile().userprincipalname)), then in your formula update each of the approvers to check for both types, like

    Lower('Approver - Group Director'.Email) = varCurrentUserEmail || Lower('Approver - Group Director'.Email) = varCurrentUserUPN

     

    I would also suggest putting your first formula (from the addcolumns part) in a gallery for debugging to see what values are returned

  • Prathameshpatka Profile Picture
    319 on at

    @iAm_ManCat 

     

    I had amended the condition as below and asked one of Regional directors to open the app and see if the icon appear but unfortunately it is still not working

     

    Prathameshpatka_0-1656581474168.png

     

    Variables are set as below :

     

     

    Prathameshpatka_1-1656581493067.png

     

    Prathameshpatka_2-1656581527786.png

     

     

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Have you done any debugging?

    You could also have them open a monitor session and see where its pulling the wrong data

    alternatively, insert three labels into the gallery I suggested in my last post,

    varCurrentUser

    varCurrentUserUPN

    'Approver -  Group Director'.Email

     

    that way you get the user to log in and their email/upn will show and the filtered list of items will show - you should be able to determine where the mismatch is happening that way

  • Prathameshpatka Profile Picture
    319 on at

    @iAm_ManCat 

     

    Yes we have tried hardcoding the email address in the code but it still doesn't work. What I have observed now as per your suggestion is that the

    varCurrentUser

    varCurrentUserUPN

    shows the below values : the first one is the varcurrentuser and the second one is varcurrentuserupn

    Prathameshpatka_0-1656584922439.png

     

    On the SP list the coloumn 

    'Approver -  regional Director'.Email has this email address.

     

    Prathameshpatka_1-1656585042777.png

     

    Looks different ? but we are still making it to Lower('Approver - Regional Director'.Email ) ? so not sure why it isn't working ?

     

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    When Kaval uses the App, what are the currentUser and CurrentUserVPN values? if they don't match the column then the filter won't return anything so this would be a good place to start looking.

  • Prathameshpatka Profile Picture
    319 on at

    @iAm_ManCat 

     

    So when kaval logs in the varcurrentuser is Kaval.Patel@b..h..com and varcurrentuserupn is kaval.patel@b..h..com

     

    While on the the list it is Kaval.Patel@B...H...com

     

    But my question is we are already making Lower('Approver - Regional Director'.Email ) = Lower (varcurrentuser) so should that still make a difference ?

     

    If it still affects how do I make it lower in the list as well ?

  • WarrenBelz Profile Picture
    155,290 Most Valuable Professional on at

    @Prathameshpatka ,

    Try

    StartsWith(
     'Approver - Regional Director'.Email,
     varcurrentuser
    ) 

    which is not case-sensitive

     

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

     

     

  • Prathameshpatka Profile Picture
    319 on at

    @WarrenBelz 

     

    Unfortunately it is still not working 😞

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard