cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

LookUp behaves inconsistently for different users

Hello,

 

I am using the following LookUp to check whether a combination of email and organization is in a table:

 

LookUp('LIST - Authorization',email=User().Email && 'Owning Organization'.Value=Dropdown1.Selected.Title,email)

 

This lookup works inconsistently - for some users, it returns value (which is correct), but for some others it doesn't.

 

Can you advise if there is some issue with formula or, if this is a bug, is there a workaround?

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @Anonymous 

If there are 542 records in your list, I think the easiest fix would be to increase the 'data row limit for non delegable queries' setting to the maximum permitted value of 2000. That should hopefully solve the problem for you.

 

image.png

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Do you face a Delegation warning issue with your LookUp formula?

Is the email column a Text type column in your SP List?

 

Based on the issue that you mentioned, I think you have faced a Delegation warning issue with your LookUp formula. Please consider tale a try with the following workaround:

Set the OnStart property of App to following:

Set(CurrentUserEmail, User().Email)

modify your LookUp formula as below:

LookUp('LIST - Authorization',email = CurrentUserEmail && 'Owning Organization'.Value=Dropdown1.Selected.Title, email)

then re-publish and re-load your app (fire the OnStart property of App), then check if the issue is solved.

 

In addition, please consider set the "Data rows limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app, then re-publish your app, then check if the issue is fixed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
DisappointmentB
Advocate III
Advocate III

Hello,

 

This could be because some users do not have an email address coming through for their account. You can check this by adding a label to the screen and setting its Text to the User().Email. Can you try that and then report back?

 

Regards

 

Ben

Anonymous
Not applicable

Hello @DisappointmentB 

 

Thank you for the quick reply. I did try that already. For users where lookup is failing, email is coming through correctly.

OK maybe worth ensuring that everything is equal so use the Trim function on each side of the formula and force both into Upper Case with a Upper function. Would also be worth adding a label and adding the other side of the equation

Hi @Anonymous 

If you're certain that the email/organisation combination exists in the 'LIST - Authorization' list for users that experience this problem, the cause is mostly likely because User().Email is not delegable. Do you see any blue squiggy lines in your Lookup formula? How many records do you have in your list?

To fix this type of delegation problem, you can define a variable in the OnStart property of your app..

Set(varUserEmail, User().Email)

 

You can then modify your formula to use this variable like so..

LookUp('LIST - Authorization',
       email=varUserEmail && 'Owning Organization'.Value=Dropdown1.Selected.Title,
       email
)
Anonymous
Not applicable

@DisappointmentB 

 

Thank you for the quick reply. I tried this, but it unfortunately did not fix the issue for the users who have it.

 

@timl 

 

Thank you for the reply. I do see the double blue line in Lookup formula and hover-over text is showing "Delegation warning". There are 542 records in the list.

 

I tried the solution you mentioned, but the formula doesn't work at all now. Is there some other change I need to do also?

Hi @Anonymous 

If there are 542 records in your list, I think the easiest fix would be to increase the 'data row limit for non delegable queries' setting to the maximum permitted value of 2000. That should hopefully solve the problem for you.

 

image.png

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Do you face a Delegation warning issue with your LookUp formula?

Is the email column a Text type column in your SP List?

 

Based on the issue that you mentioned, I think you have faced a Delegation warning issue with your LookUp formula. Please consider tale a try with the following workaround:

Set the OnStart property of App to following:

Set(CurrentUserEmail, User().Email)

modify your LookUp formula as below:

LookUp('LIST - Authorization',email = CurrentUserEmail && 'Owning Organization'.Value=Dropdown1.Selected.Title, email)

then re-publish and re-load your app (fire the OnStart property of App), then check if the issue is solved.

 

In addition, please consider set the "Data rows limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app, then re-publish your app, then check if the issue is fixed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Hello @timl and @v-xida-msft 

 

Thank you for your replies. What did the trick was increasing the 'data row limit for non delegable queries' to 2000.

 

Thanks for the help!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,670)