0

I need to set up a dropdown selection based on a button trigger. If button not selected, dropdown must remain empty.

Could anyone assist?

Using following syntax on the dropdown:

If(button1.selected, dropdown1= "selection", "")
0

Add this formula on OnVisible property of Screen:

UpdateContext({ddDefaultValue: ""})

Then set Default property of dropdown control to:

ddDefaultValue

Add below formula on OnSelect property of button:

UpdateContext({ddDefaultValue: "selection"})

For more information, refer: Set Dropdown value with Button Click

0

A few things you should notice:

  1. There is no Selected property for Button control.

    As far as I know, you can only configure one-way action on one button control, there is no “release” or “unselect” status for it once the button is clicked, unless you reset Button.OnSelect from outside.

    You will need a second button if you want to clear the dropdown control value.

  2. If you decide to use UpdateContext function (as the first Answer introduced), note that the default value should be set on the Choice column data card instead of the combo box (DataCardValue2)

    For example: <ChoiceColumn>_DataCard.Default = { Value: ddDefaultValue }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.