Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using selected value of DropdownList in Function

Hi All, I'm having an issue with an app that I am creating with lots of form controls. I have created a function that sends an HTML email when the user clicks on a button. What I want is for the selected values of dropdownlists to be consumed in this function. When I use the syntax ddllist.selected it says it is an invalid argument. This is clearly incorrect and I wondered if you guys have a better way of achieving this task? Thanks! Joe

Accepted Solutions

You could provide the formatting options in your message body. FoorExample: "<H2>&MyMessage&</H2>"

View solution in original post


Hello @Anonymous, First of all, can you please confirm if you're indeed using a DropDown control and not a ComboBox control? The ComboBox control is offered by default in forms. Please note that ComboBox.Selected property reference a record, not a field. You will have to add the field name there (example: ComboBox.Selected.Value).
Not applicable

Hi @dinusc, I am using a dropdown control rather than a combobox control. This is by design as these controls show fixed information such as countries/titles/nationalities

Thank you for clarifying. I would still suggest to check if your DropDown.Selected returns a record rather than a field (this depends on the bound source). If you type a period after the "Selected" property, does Web Studio offer a list of field names to select from? Do you see any other errors besides the "Invalid Argument" when attempting to use DropDown.Sleected?

Not applicable

It does not return anything if I use the selected value. The datasource for these dropdownlists are hard coded for each individual dropdownlist rather than being bound to a datasource such as a SQL table. It doesn't five me a list of field names when I typoe a period after the selected property. It says it's expecting a Text/Number/Boolean value

Could you please provide the hard coded data source the DropDown control is bound to?

Not applicable



Here is an example of a dropdownlist used in the app:


Items=["Please Select",
"Cape Verdean",
"Central African",
"Costa Rican",
"East Timorese",
"Equatorial Guinean",
"Kittian and Nevisian",
"New Zealander",
"North Korean",
"Northern Irish",
"Papua New Guinean",
"Saint Lucian",
"San Marinese",
"Sao Tomean",
"Sierra Leonean",
"Solomon Islander",
"South African",
"South Korean",
"Sri Lankan",
"Trinidadian or Tobagonian",






Thank you.

As previously suggested, the DropDown returns a record as the selected item, so you will have to indicate the field name. Here is the result of my test done with your test data set:Capture.PNG

 The DropDown control references a record. Since you provide hard coded values (that are not records), PowerApps implies one automatically (named Value).

Holpe this helps.

Not applicable

That seems to have worked! With the Office365.Sendmail function is it possible to control the HTML formatting to include h1, strong etc or is that not supported?

You could provide the formatting options in your message body. FoorExample: "<H2>&MyMessage&</H2>"

View solution in original post

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (24,559)