I have a text value called tTypeText. This shows a default value.
I have a drop down box called ddtype. If i select an item from the drop down box, i want it to change the value in the text box.
Anyone any ideas?
This formula what you do is pass what you have in the drop down list to a texbox.
You have to do this formula inside the tTypeText in the text part. I hope it works for you.
If(Dropdown1.Selected.Value = 1; "1"; Dropdown1.Selected.Value)
This should work in the Text property of your tTypeText to show the selected value from the dropdown.
But could you be more specific about the value that should change when something is selected.
thanks for your replies.
Its the OnChange function i am struggling with. I dont always want the text box to take the drop down box's value unless a value is selected from it. Otherwise i want it to keep the default value.
By my knowledge I don't think it is possible to manipulate/change a text in an OnChange property of another field.
I tested it and it doesn't change my text when I select a value from a dropdown. So this is what I did that didn't work in the OnChange of the dropdown:
If(!IsBlank(ddtype),tTypeText.Text = ddtype.Selected.Value, tTypeText.Text = "Text")
And can I know what the default value is from the textbox? It's easier to recreate your issue.
I'll try and dig deeper or find a workaround for this.
Would you please explain a bit for the text value here, a Textbox, or a TextInput?
For TextBox, there is only Text property, and no default property that could work with,
for TextInput, it contains the Default property, which is the propery we could work with. For TextInput.Text, it refers to the actual Text value, there is no way to pre-define it.
For TextBox, if you would like to keep the Default value when Dropdown is not changed, we could take use of the following way to verify it:
Under TextBox text property, change the formula in the following way:
If(Dropdown1.Selected.Value="1","TextBox Default Value",Dropdown1.Selected.Value)
The first condition is used to check the Dropdown selected value with its (the dropdown) default value, here I use the dropdown sample and the default value is "1", if the selected value of the dropdown equals to "1", then the TextBox would show the Text Default Value, otherwise, it will show the Dropdown selected value.
There is a limitation for this, if the user changes the dropdown value back to default, then this formula won't show the proper dropdown value, but with the "TextBox Defualt Value".
Workaround here is:
Under the Dropdown list, add another entry to mark the unselect status, and change its defualt value with this, so that when user changes its value, this option won't be selected.
Another way is the following:
Under the Dropdown Onchange Property, copy and paste the following:
Once the dropdown changes its value, the Variable "Value1" would update its value with Dropdown selected value.
Then, use the Value1 in the Text Property of the Textbox, this way should make it work as expected:
Hope the information above is helpful.
The textbox is linked directly to the database. So whatever is stored in this field, it will post to SQL.
So the texbox shows its default value on load, and if a user then selects a new item from the drop down, i want this value to be posted to the textbox instead.
Hope this makes sense.
Did you ever find the answer to this. I have the exact same requirement. textbox gets value from table onload and then want to use a dropdown selection to change that as needed ?
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand