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 / View Icon if email is ...
Power Apps
Unanswered

View Icon if email is on list (collection)

(0) ShareShare
ReportReport
Posted on by 41

Hi!

 

What is the best approach to show and Icon if the email of creator is in list. (View if is admin)

I saw some examples (Ticket System) but couldn´t replicate it.

 

//Set the isAdmin to False on event "onStart" 
Set(isAdmin,false);

 

//Add the admin emails on event "onStart"

ClearCollect(AdminList,"jjohn@mail.com");

 

//visible properties of Icon

If(MyProfile.Mail in AdminList.Value,true,false);

 

what am I not seeing?

 

tx in advance

 

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @joeljohn,

    There is a known problem with global and context variables with the screen's  OnStart. property.  I was able to work around it though.  In the OnVisible property of the Screen:

    UpdateContext({counter:counter+1})

    In the Visible property of your icon

    counter=1

    The first time the screen is visible, the counter is set to 1 and the Visible property of the icon reduces to true. Every time thereafter, the counter is incremented and will not be 1 again until you close the app and reopen it, simulating the behaviour you desire.  If this provides you with a workable answer to your issue, please mark the thread as solved.  

  • Verified answer
    joeljohn Profile Picture
    41 on at
    Hi and tx for your fast response.

    The example you provide me works, but how can i relate this sample with the admin list emails.
    For example:

    I put a label to debug the results.

    The Text properties of the label i set it to : User().Mail and shows the current users emails. The same result if use Office365Users.MyProfile().Mail.
    But when i try to create a collection or variable to show the admins emails it does not work.
    -Create a collection ClearCollect(AdminList,"jjohn@mail.com");
    -Create a variable: Set(MyProfile, User().Email) and set the Text properties equal to: MyProfile but show nothing
    On the visible properties of the icon i put: If(MyProfile in AdminList, true, false)---not working, is blank

    How can i use your sample to simulate this?

  • Verified answer
    joeljohn Profile Picture
    41 on at
    The problem with the OnStart is that you have to save and close powerapps, so changes take effects.
    Even so, your answer was right

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard