Hi,
I need to restrict a field in Powerapps so that the logged in user can't enter his own name as "Approver" from the Office365 user list.
This is from a sharepoint list
Does anyone know how to do this?
Thanks
Trond
Solved! Go to Solution.
Please use the formulae in the Items property of your approver dropdown/Combobox.
Filter(Office365Users.SearchUser(),Mail <> User().Email)
If your approvers are in another field type make sure to add the formula in relevant place where you are filling the Approver values.
If this answers your question mark it as verified and give thumbs up
Regards,
Pavan Kumar Garlapati
Hi @Anonymous
Hi @Anonymous
Hi @yashag2255
Thanks for your quick reply 🙂
This is inside the edit form. I can't set it as View Mode as the user needs to be able to choose any other Office365 users as "Approver" but not his/her own name. So they need to be able to choose anyone but themselves as "Approver" in that input field.
Regards,
Trond
Hey @Anonymous
Thanks @yashag2255 ,
Looks like this makes sense but I must be doing something wrong...
I get an error: "Invocation of unknown or unsupported function. Location: DatacardValue34.OnSelect".
I also tried to enter this code in "Displaymode" but same error.
Any idea?
Trond
Please use the formulae in the Items property of your approver dropdown/Combobox.
Filter(Office365Users.SearchUser(),Mail <> User().Email)
If your approvers are in another field type make sure to add the formula in relevant place where you are filling the Approver values.
If this answers your question mark it as verified and give thumbs up
Regards,
Pavan Kumar Garlapati
Hi @PavanKumar and @yashag2255
I still have the same error :(.
In the Items property there is already filled: Choices('WBS Masterdata'.'Approver')
I use the DisplayFields as: ["DisplayName","Email"] and SeacrhField: ["DisplayName"]
I tried to replace Email with Displayname in Filter(Office365Users.SearchUser(),Mail <> User().Email)
Can you see any other issues here?
Frustrating....
Hi @Anonymous
Hi @yashag2255
I still face the same issue 😞
Should'nt there be any data source in the properties in the DatacardValue?
I tried to add the data source but the Items changed to Items = 'WBS Masterdata'
Regards,
Trond
Hi @Anonymous
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
139 | |
96 | |
83 |