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
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.
Thanks for the indication and I look forward to it's release!
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?
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... 😉
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.
@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?
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.
Stay up to date on forum activity by subscribing.
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399