cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

how to replace the search box with a dropdown

Hi,

 

Still pretty new to the powerapps and I have a question regarding one of the pre equipped Email screen. I am trying to replace the search bar with a dropdown box that uses emails from a table I have in excel but keep everything else intact. How do I go about doing this, and what formulas do I need to change around in order to make this possible?

 

Thanks,

Ryan

9 REPLIES 9
Highlighted
Dual Super User II
Dual Super User II

Re: how to replace the search box with a dropdown

Hi @Ryan_LaCroix 

 

First hide the Search Box and the search icon by setting visible property to false

Next add a dropdown control and set the Items property to your excel file which contains the email ids

 

Next the send email icon - Update display mode property to remove the dependecy on the search field

Updated formula

If(Len(Trim(TextEmailSubject1.Text)) > 0 , DisplayMode.Edit, DisplayMode.Disabled)

 

In the Onselect property of the Send Email Icon

 

Update Office365.SendEmail(DropdownName.SelectedText.Value, TextEmailSubject1.Text, TextEmailMessage1.Text, {Importance:"Normal"}); 

 

 

This should now have the email screen working with your custom dropdown

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

 

 

Highlighted
Super User III
Super User III

Re: how to replace the search box with a dropdown

Hi @Ryan_LaCroix 

First, you want to make sure that the dropdown contains unique names and then you will need to filter your gallery or datatable with the result of your selection.  The Dropdown items property should look something like this:

Sort(Distinct(YourTable, YourColumn), Result, Ascending)

The distinct function will create a single column table with the field name Result.  You would change the Items property of the gallery to 

Filter(YourTable, YourColumn = Dropdown1.Selected.Result)

In the formulas above replace YourTable with the name of the Excel table and YourColumn with the name of the column in the table that you wish to filter on. 

Highlighted
Helper II
Helper II

Re: how to replace the search box with a dropdown

Hi @Ryan_LaCroix 

 

You need to add your Excel Data Source (Formated to a Table) to Powerapps - View > Data Sources > + Add Data Source > Import From Excel

 

Next insert a Drop down box

 

On the items property of the Drop down you add your Excel Data Source And on the Value property you choose the column you want the Drop down to show.

 

Next is you need to Filter your Gallery, it could go something like this on the item property of the Gallery: Filter(YourData, Column = Dropdown.Selected.ExcelDataColumn).

 

I am new at trying to explain Powerapps stuff so feel free to ask any questions you may have. 

Highlighted
Helper I
Helper I

Re: how to replace the search box with a dropdown

Hi @RezaDorrani,

 

I followed all of the steps listed and found that there was still an error when I tried sending the email. Is there another step that I am missing thats resulting in this email error?

 

Thanks,

Ryan

Highlighted
Dual Super User II
Dual Super User II

Re: how to replace the search box with a dropdown

@Ryan_LaCroix  post screenshot of the error

 

Highlighted
Helper I
Helper I

Re: how to replace the search box with a dropdown

@RezaDorrani,

 

here is the error message I am receiving.

Highlighted
Helper I
Helper I

Re: how to replace the search box with a dropdown

Does it have to do with the accessible label?

 

Highlighted
Dual Super User II
Dual Super User II

Re: how to replace the search box with a dropdown

@Ryan_LaCroix 

Now screenshot of the formula you are using when sending email

Highlighted
Helper I
Helper I

Re: how to replace the search box with a dropdown

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,528)