Thanks in advance for any help.
I am trying to filter based on office365user (currently logged in) using Office365Users.MyProfile().MailNickname which is for example "rjohnson". I'd like Office365Users.MyProfile().MailNickname to match our own company UserID. Upon matching I want ComboBox.Salesrep to return Salesrep field equals to only Robert Johnson.
Datasource 1: Office365Users
Field: MailNickname
Datasource 2: Salesrep_tbl (Sharepoint list)
Field: UserID & Salesrep
Again, appreciate the help.
Solved! Go to Solution.
Hi @baller72 ,
Based on the screenshot that you mentioned, I think you have faced a Delegation warning issue with your formula.
If you have faced a Delegation warning issue with your formula, it means that you could not delegate the data process to your data source itself (on your side, it is Salesrep_Distinct_UserID), instead, you could only process your data locally.
If the amount of your Salesrep_Distinct_UserID data source records is not more than 2000, you could ignore this warning issue. More details about the Delegation warning issue, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview
In order to get rid of this Delegation warning issue, please consider take a try with the following workaround:
Set the OnStart property of the App to following:
Set(CurrentUserNickName, Office365Users.MyProfile().MailNickname)
Then modify your Filter formula as below:
Filter(Salesrep_Distinct_UserID, UserID = CurrentUserNickName).Salesrep
then re-load your app (fire the OnStart proeprty of App), check if the issue is solved.
Best regards,
Hi @baller72 ,
Could you please share a bit more about the UserID column in your Salesrep_tbl SP List? Is it a Single text type column?
Could you please share a bit more about the Salesrep column? Is it a Choice type column?
Further, do you add a ComboBox to connect to the Salesrep column in your SP List?
I have made a test on my side, please take a try with the following formula:
LookUp(Salesrep_tbl, UserID = Office365Users.MyProfile().MailNickname, Salesrep)
or
LookUp(Salesrep_tbl, UserID = Office365Users.MyProfile().MailNickname).Salesrep
Note: I assume that the User ID column is a Single text type column.
If the Salesrep column is a Choice type column, and you want the ComboBox to connect to this column where current login user MailNickName matches the User ID column, please take a try with the following workaround:
Set the Items property of the ComboBox to following:
Filter(
Choices(Salesrep_tbl.Salesrep),
Value in Filter(Salesrep_tbl, UserID = Office365Users.MyProfile().MailNickname).Salesrep.Value
)
If the Salesrep column is a Single text column, please set the Default property of a Text Input box to following:
LookUp(Salesrep_tbl, UserID = Office365Users.MyProfile().MailNickname, Salesrep)
or
LookUp(Salesrep_tbl, UserID = Office365Users.MyProfile().MailNickname).Salesrep
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Hey @v-xida-msft .
Thanks for helping out. I will give this a go then let you guys know.
Salesrep - Single line of text ( I added a combobox)
UserID - Single line of text
Appreciate your time.
I was able to filter the salesrep, but have this warning. Any work around?
Items property (warning)
Default property (error)
DefaultSelectedItems property (warning)
Hi @baller72 ,
Based on the screenshot that you mentioned, I think you have faced a Delegation warning issue with your formula.
If you have faced a Delegation warning issue with your formula, it means that you could not delegate the data process to your data source itself (on your side, it is Salesrep_Distinct_UserID), instead, you could only process your data locally.
If the amount of your Salesrep_Distinct_UserID data source records is not more than 2000, you could ignore this warning issue. More details about the Delegation warning issue, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview
In order to get rid of this Delegation warning issue, please consider take a try with the following workaround:
Set the OnStart property of the App to following:
Set(CurrentUserNickName, Office365Users.MyProfile().MailNickname)
Then modify your Filter formula as below:
Filter(Salesrep_Distinct_UserID, UserID = CurrentUserNickName).Salesrep
then re-load your app (fire the OnStart proeprty of App), check if the issue is solved.
Best regards,
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
257 | |
122 | |
86 | |
73 | |
72 |