Hi all, I have a problem with a duration of LookUp function and hope someone can help.
There's a requirement to get users' name in local language
1. I use Office365 Users connection to get current users' Mail
2. I have a table with two columns - Email and User Full Name (in Russian)
3. I need to find related Full Name in this table by users' email
I've tried both Excel file and SharePoint list connections, but both proceed too slowly - more than 5 minutes till the result is calculated.
There are 2500 rows in a datasource. This is pretty big but I used to proceed larger datasets much faster in other Apps.
Could anyone share any advice on how to workaround such a requirement?
Thanks in advance for your help!
Solved! Go to Solution.
Ok,
So first thing - on your App OnStart, have it write the russian email address to a global variable so that it's not looking that up every time the LookUp is performed:
App.OnStart = Set(EmailRus, ПользователиOffice365.MyProfile().Mail)
Then your lookup should use that variable which is now static:
LookUp(UserNamesRu;'Employee Email' = EmailRus;'Employee Name (rus) ')
Let me know if this helps at all,
Cheers,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi,
Could you share the formula you are using to do the lookUp, as I feel like this will be dependant on many factors, including how the query was written and what speed connection you are on.
To get the current logged in user's email address, you don't need to use the Office365 users connector as there is already an internal PowerApps function - User() - that provides this:
User().Email
Cheers,
Mancat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Thanks for your reply.
Queries attempted:
First(Filter(UserNamesRu;'Employee Email' = ПользователиOffice365.MyProfile().UserPrincipalName)).'Employee Name (rus) '
LookUp(UserNamesRu;'Employee Email' = ПользователиOffice365.MyProfile().Mail;'Employee Name (rus) '))
And several variations of those.
The use-case is to fetch the russian names as User() will fetch the english names as is the default language in our active directory
Hi,
Thank you for your reply, I'll check internal PowerApps formula also, but guess that the problem is in the datasource for looking up into. The actual formula is - LookUp(UserNamesRu; 'Employee Email' = ПользователиOffice365.MyProfile().Mail; 'Employee Name (rus) '))
UserNamesRu - the SP list with 2 columns. First is checked for matching the user mail. Already tried Excel table from a local file
Another formula I've tried is - First(Filter(UserNamesRu;'Employee Email' = ПользователиOffice365.MyProfile().Mail)).'Employee Name (rus) '
Both cases work too long, list contains 2,5 K rows
Ok,
So first thing - on your App OnStart, have it write the russian email address to a global variable so that it's not looking that up every time the LookUp is performed:
App.OnStart = Set(EmailRus, ПользователиOffice365.MyProfile().Mail)
Then your lookup should use that variable which is now static:
LookUp(UserNamesRu;'Employee Email' = EmailRus;'Employee Name (rus) ')
Let me know if this helps at all,
Cheers,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi, ManCat
Thank you so much! This really helped. Now it works brilliantly fast.
@ankitadasgupta , thank you very much too for helping with this issue!
You're both welcome, glad to help!
Please mark my reply as solution if you believe it resolved the issue for you 🙂
Thanks,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |