cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
D1Consulting
Frequent Visitor

Combobox with search field

Hi, I have two tables with the next fields  :

 

Valideur

- Nom  ==> field search of table Users

 

Utilisateur

- Nomutilisateur==> field search of table Users

- Admin ==> True or False

 

I created 10 items of Utilisateur, and when i create a Valideur, i would like to choose in a combobox a Users. 

For the combobox, I use Items=Choices(Valideur.Nom), but all the Users are listed in the combobox. I Would like only users of Utilisateur Table.

 

How can i to filter this Combobox ?

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @D1Consulting ,

 

Could you please share more details about your scenario? What's the data source in your App, is it Dataverse? In which way are you creating new items in the Valideur table, using Form or not?

 

Assuming you are using Dataverse tables as data sources, so the Nom field in the Valideur table and the the Nomutilisateur field in Utilisateur table are both LookUp field. Since you would like only the chosen users in the Utilisateur table to be populated into the Combo box, please try below formula in Items property of it:

Distinct(Utilisateur, Nomutilisateur.'Full Name')

 

The next step, if you are using an Edit Form to create new items in the Valideur table, you will need a LookUp function to find the User in Users table corresponding to the selected user name in the Combo box, so the Update property of the Nom Data Card need be modified to:

LookUp(Users, 'Full Name' = NomCombobox.Selected.Result)

 

Using Filter in the Combo box could be working while the LookUp fields would easily cause delegation issue. Unless Utilisateur table would include more than 2000 users( change non-delegable value in Settings of the Studio), the Distinct function would help avoid it.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @D1Consulting ,

 

Could you please share more details about your scenario? What's the data source in your App, is it Dataverse? In which way are you creating new items in the Valideur table, using Form or not?

 

Assuming you are using Dataverse tables as data sources, so the Nom field in the Valideur table and the the Nomutilisateur field in Utilisateur table are both LookUp field. Since you would like only the chosen users in the Utilisateur table to be populated into the Combo box, please try below formula in Items property of it:

Distinct(Utilisateur, Nomutilisateur.'Full Name')

 

The next step, if you are using an Edit Form to create new items in the Valideur table, you will need a LookUp function to find the User in Users table corresponding to the selected user name in the Combo box, so the Update property of the Nom Data Card need be modified to:

LookUp(Users, 'Full Name' = NomCombobox.Selected.Result)

 

Using Filter in the Combo box could be working while the LookUp fields would easily cause delegation issue. Unless Utilisateur table would include more than 2000 users( change non-delegable value in Settings of the Studio), the Distinct function would help avoid it.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,491)