Hi there,
I have a dropdown (NOT a ComboBox) with Default: ddDefaultValue
I also have OnVisible: UpdateContext({ddDefaultValue: "No Multiplier"}) - this sets the dropdown to "No Multiplier" - my chosen default value for this dropdown upon opening the app.
I want to create a button that looks at the value of Label1 (a text label) and enters this into the dropdown.
I've tried creating a button with OnSelect: UpdateContext({ddDefaultValue: Label1.text}) but this does not work and simply clears the dropdown - does anyone have any ideas please?
Many thanks 🙂
Solved! Go to Solution.
hi @TheMaster
Consider the following:
OnVisible
Set(varData,["No Multiplier", "Your Value of Label1", "Another Vlaue"]);
UpdateContext({_defaultData: "No Multiplier"})
Button
OnSelect = UpdateContext({_defaultData: Label1.Text})
This will set you default value to the label text. if the label's text is not in the source (Item) it will revert to the first item.
PS what is you Items set to and what is the value of the label?
I hope this helps,
R
hi @TheMaster
Consider the following:
OnVisible
Set(varData,["No Multiplier", "Your Value of Label1", "Another Vlaue"]);
UpdateContext({_defaultData: "No Multiplier"})
Button
OnSelect = UpdateContext({_defaultData: Label1.Text})
This will set you default value to the label text. if the label's text is not in the source (Item) it will revert to the first item.
PS what is you Items set to and what is the value of the label?
I hope this helps,
R
User | Count |
---|---|
254 | |
106 | |
88 | |
51 | |
43 |