cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Partisan
Post Partisan

Dropdown - hide items untill searching

I am using this in a dropdown

'Office365user'.SearchUser({searchTerm:ComboBox2.SearchText})

 

It works great and i can search for any user in my organisation.

 

But i want to limit the list and not show hundreds of users... i just want to show a few.

And i dont want the first top names to show when searchbox is empty.... just show when the first character is entered in the search box.

 

how can i do this?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Dropdown - hide items untill searching

Hi @Oskarkuus 

 

to limit use

Office365Users.SearchUser({searchTerm: ComboBox2.SearchText, top: 15})

 

to show only if data exists

If(!IsBlank(Trim(ComboBox2.SearchText)), Office365Users.SearchUser({searchTerm: Trim(ComboBox2.SearchText), top: 15}))

 

Regards,

Reza Dorrani

 

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

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Dropdown - hide items untill searching

Hi @Oskarkuus 

 

to limit use

Office365Users.SearchUser({searchTerm: ComboBox2.SearchText, top: 15})

 

to show only if data exists

If(!IsBlank(Trim(ComboBox2.SearchText)), Office365Users.SearchUser({searchTerm: Trim(ComboBox2.SearchText), top: 15}))

 

Regards,

Reza Dorrani

 

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

Highlighted
Community Support
Community Support

Re: Dropdown - hide items untill searching

Hi @Oskarkuus ,

Do you want to limit the Items within ComboBox control?

Do you want to show items within the ComboBox only when you typed the first character within it?

 

Based on the needs that you mentioned, I think a Timer control could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Add a Timer control within your app, set the Duration property to following:

1000

set the Repeat property and AutoStart property to following:

true

set the OnTimerEnd property to following:

If(
   IsBlank(ComboBox1.Selected),
   Set(ShowValues, false),
   Set(ShowValues, true)
)

Then within your ComboBox, set the Items property to following:

If(
   ShowValues = true,
   Office365Users.SearchUser({searchTerm:ComboBox1.SearchText,top:20})
)

Please consider take a try with above solution, check if the issue is solved.

 

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.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,256)