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 Apps
Answered

Help optimizing

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey guys, on my app, I want it to be open for everyone, but some specific functions to a restrict employees.

 

Now I am using a formula like this.

 

Set(varUserAllows ; Or(
User().FullName = "Adilson Ferreira" ;
User().FullName = "Alexandre Wojciechowski" ;
User().FullName = "Jairo Pires Alves" ;
User().FullName = "Jesse Paula" ;
User().FullName = "Luiz Fernando Seeller" ;
User().FullName = "Mauricio Caneca Neto" ;
User().FullName = "Milton Silva" ;
User().FullName = "Rafael de Carvalho" ;
User().FullName = "Vagner Oliveira" ;
User().FullName = "Valter Diego Percegona";
User().FullName = "Edio Paulo da Silva";
User().FullName = "Sergio Cotta";
User().FullName = "Igor Oliveira";
User().FullName = "Kleber Antônio Glovatski" ;
User().FullName = "Thais Machado";
User().FullName = "Rafael Vinicius Dropa de Bortoli";
User().FullName = "Diogo Albino";
User().FullName = "Marcelo Nunes Stefano"))

 

Considering that the User().FullName is a slow function, how can I optimize it to the app load faster and get the same results?

This formula is on the OnStart property...

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Anonymous,

    You could try something like this:

    Set(varUserAllows ; 
    User().FullName in ["Adilson Ferreira" ;
     "Alexandre Wojciechowski" ;
     "Jairo Pires Alves" ;
     "Jesse Paula" ;
     "Luiz Fernando Seeller" ;
     "Mauricio Caneca Neto" ;
     "Milton Silva" ;
     "Rafael de Carvalho" ;
     "Vagner Oliveira" ;
     "Valter Diego Percegona";
     "Edio Paulo da Silva";
     "Sergio Cotta";
     "Igor Oliveira";
     "Kleber Antônio Glovatski" ;
     "Thais Machado";
     "Rafael Vinicius Dropa de Bortoli";
     "Diogo Albino";
     "Marcelo Nunes Stefano"
     ]
    )
    

    Or prior to that line of code, you could store the value of User.FullName into a variable and carry out the comparison against the variable value. That way, you wouldn't need to call User.FullName multiple times.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Great!

     

    Thanks! @timl, now the app is faster on the start..

     

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard