cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ryan_LaCroix
Level: Powered On

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
Dual Super User
Dual Super User

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

 

 

 

 

 

Super User
Super User

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. 

yanni99
Level: Powered On

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. 

Ryan_LaCroix
Level: Powered On

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

Dual Super User
Dual Super User

Re: how to replace the search box with a dropdown

@Ryan_LaCroix  post screenshot of the error

 

Ryan_LaCroix
Level: Powered On

Re: how to replace the search box with a dropdown

@RezaDorrani,

 

here is the error message I am receiving.

Ryan_LaCroix
Level: Powered On

Re: how to replace the search box with a dropdown

Does it have to do with the accessible label?

 

Dual Super User
Dual Super User

Re: how to replace the search box with a dropdown

@Ryan_LaCroix 

Now screenshot of the formula you are using when sending email

Ryan_LaCroix
Level: Powered On

Re: how to replace the search box with a dropdown

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,838)