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 / Named Formulas Delegation
Power Apps
Unanswered

Named Formulas Delegation

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

When I use a named variable as a reference in another named variable it prevents delegation that a standard variable would allow.

 

e.g.

 

App.Formulas:
gblUserEmail = User().Email;
gblUserRecord = LookUp(SP_List, email = gblUserEmail); // Not Delegable

gblUserRecord2 = LookUp(SP_List, email = "joe.blogs@blah.com"); // Delegable 

 

 

Using the named formula values in a LookUp when assigning a global variable also prevents delegation

 

Button.OnSelect:
Set(gblUserRecord3, LookUp(SP_List, email = gblUseremail)); // Non delegable

Tried to trick it using a 'with' statement (also does not work)
With(
 {
 tmpEmail:gblUseremail
 },
 Set(gblUserRecord3, LookUp(SP_List, email = tmpEmail)); // Non delegable

 

 

 I'm assuming this is a bug, as it is not very helpful if the value cannot be referenced as part of lookups for other functionality?

 

Update:

I have found that it can be tricked initially, as shown below (expected output = Account). Definitely not clean code

tonnoAnalyst_0-1679027489841.png

Categories:
I have the same question (0)
  • JorisdG Profile Picture
    Microsoft Employee on at

    There are still some delegation issues in Named Formulas, as you've found out. These are currently being looked at and we definitely want this to work as expected before we GA the feature.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @JorisdG Thank you for your response! I have only just started experimenting with the use of named formulas and moving away from variable assignment via App.OnStart. In your opinion, how reliable/ready is the named formulas feature in it's current state and is there an ETA on GA?

  • JorisdG Profile Picture
    Microsoft Employee on at

    As far as I'm aware the delegation issue is the last big thing we need to resolve. I don't have any hard dates as we want to closely monitor usage with all fixes we make to ensure quality, so barring any new issues or problems resolving the known ones, we're hoping to push this to preview (i.e. supported state) in April or May. That doesn't mean we won't make any more improvements of course, but we feel that should be a good time frame to resolve and monitor the fixes for the remainder of known issues. If we can make that time we should realistically be able to GA by June/July. Again, no hard promises but that's our current goal.

  • R3dKap Profile Picture
    1,594 on at

    Hi,

    Just adding my comment here to confirm that after moving some variables from OnStart to Formulas, many delegation issues poped up... 😥

    Hope for a quick fix... 😉

  • R3dKap Profile Picture
    1,594 on at

    By the way @JorisdG, is this delegation warning real or is the risk not real? I mean, are we risking that some returned data might not be correct if we keep our variables into Formulas? If so I suppose it's recommended we move them back to OnStart right?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the indication and I look forward to it's release!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @R3dKap,

     

    Based on my testing, it is a real warning in its current state. Try reducing the delegation limit to 1 and you can observe the effect.

     

    You can seem to trick it by storing the returned value as a temporary variable via the with function as shown in my post. 

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 834

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard