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

How to set up drop down default value to a text

Hi,

I have a Powerapp that is connected to a Flow and the Flow will write to a SharePoint list. 

I have couple of dropdown box in Power app and those are getting items from the SahrePoint list choise field.

When the Power app Button onselect I m running a Flow, but based on the user slections(user request type) some  dropdowns are hidden and so that means user is not selecting any item for those hidden dropdowns, 

the issue is when I try to run the flow button click for this type of senario I m getting an error as follows 

Run failed: The method 'Run' has an invalid value for parameter

I think this has happen as I have used Ask Powerapp value in my Flow for those dropdown fields,so it is expecting a value to pass from Power app to Flow

So what I m thinlkin in this case to avoid the issue,  if user hasnt select a value from the drop down set up a default value to pass to flow to make the flow triggers correctly.

note- I have set up txt box default  to " ", then the flow is working, but I dont know how can I set up this on drop downs.

Can someone please hekp to et up dafult value on drop down.

I follow the instruction on the following thread but still not working for me 

link

Many thanks 

2 ACCEPTED SOLUTIONS

Accepted Solutions
NewNW
Level: Powered On

Re: How to set up drop down default value to a text

Thanks V-xida-msft,

I have used { Value:""}, working for me, as attached screenshot I can now make default to "", when the user select Request type is to exit staff then the hardware required dropdown and some other unrelevent dropdowns are hidden, so then user cannot enter/select any value on those hidden controls, so the default is "" and with this deafult value when the flow calls it will take " " value and run the flow succesfully. 

dropdowndeafult.pngDefault Drop down Value

thanks for this.

 

But the other issue is now I have mutliple selction called Additional sw , but when I use {Value:""} it will give me an error same as my oraginal error. can you please tell me how can I set up a default  to "" on multiple selection , because when the user select exit staff for request type this Additional sw control will hidden and so I would like to pass a default value for this to satisfied the flow.

 

multipleselct.pngMultiple Selection

Thanks. 

View solution in original post

Community Support Team
Community Support Team

Re: How to set up drop down default value to a text

Hi @NewNW ,

Do you want to set a Default value within the mutliple selction ComboBox control (Additional sw)?

 

If you want to set a Default value within the mutliple selction ComboBox control (Additional sw), please take a try with the following workaround:

Set the DefaultSelectedItems property of the ComboBox within the Additional Software Required Data card to following:

Table(
        {
           Value: " "
        }
)

 

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.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: How to set up drop down default value to a text

@NewNW 

You will want to first make sure that the Default property of your DropDown is correct and that some value is selected.

Then, make sure you are passing the Value to the Flow in your Parameter (dropDown.Selected.Value)

If that is not what you're looking for, then you can consider using the Coalesce function to render a default.  So your parameter would be  Coalesce(dropDown.Selected.Value, "yourDefault").  That will pass, either the selected value, or the "default"...whichever is first to be not blank/empty.

 

I hope that helps you some and give you more fuel for thought.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: How to set up drop down default value to a text

Hi @NewNW ,

Could you please share a screenshot about your app's configuration?

Could you please show more details about the Dropdown box that you mentioned? Is it Dropdown controls or ComboBox controls?

 

If the Dropdown box that you mentioned is a Dropdown control, I think your issue is not related to the hidden Dropdown controls. In Default, the result the Dropdown1.Selected.Value formula returns is a first option value within the Dropdown control rather than Blank.

 

I suppose that the Dropdown box that you mentioned is a ComboBox control, is it true? If the Dropdown box you mentioned is Combo Box control, and you want to set a Default value within it, I have made a test on my side, please take a try with the following workaround:1.JPG

Set the Items property of the Combo Box to following:

Choices('20181019_case9_Courses'.ProjectType)  /* <-- ProjectType is a Choice type column in my SP list */

Set theDefaultSelectedItems property of the Combo Box to following:

{
    Value: " "
}

then you could pass the ComboBox Selected value to your flow via the following formula:

ComboBox1.Selected.Value    /* <-- " " */

Please also check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

In addition, you want the Default value of the Dropdown control to be " ", please take a try with the following workaround:

Set the OnStart property of the App control or OnVisible property of the first screen to following:

ClearCollect(
DropdownCollection,
{ProjectType: " "},
Choices('20181019_case9_Courses'.ProjectType)
)

On your side, you should type:

ClearCollect(
             DropdownCollection, 
             {ChoiceColumn: " "}, 
             Choices('YourSPList'.ChoiceColumn)
)

Set the Items property of the Dropdown control to following:

DropdownCollection

 

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.
NewNW
Level: Powered On

Re: How to set up drop down default value to a text

Thanks V-xida-msft,

I have used { Value:""}, working for me, as attached screenshot I can now make default to "", when the user select Request type is to exit staff then the hardware required dropdown and some other unrelevent dropdowns are hidden, so then user cannot enter/select any value on those hidden controls, so the default is "" and with this deafult value when the flow calls it will take " " value and run the flow succesfully. 

dropdowndeafult.pngDefault Drop down Value

thanks for this.

 

But the other issue is now I have mutliple selction called Additional sw , but when I use {Value:""} it will give me an error same as my oraginal error. can you please tell me how can I set up a default  to "" on multiple selection , because when the user select exit staff for request type this Additional sw control will hidden and so I would like to pass a default value for this to satisfied the flow.

 

multipleselct.pngMultiple Selection

Thanks. 

View solution in original post

Community Support Team
Community Support Team

Re: How to set up drop down default value to a text

Hi @NewNW ,

Do you want to set a Default value within the mutliple selction ComboBox control (Additional sw)?

 

If you want to set a Default value within the mutliple selction ComboBox control (Additional sw), please take a try with the following workaround:

Set the DefaultSelectedItems property of the ComboBox within the Additional Software Required Data card to following:

Table(
        {
           Value: " "
        }
)

 

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,935)