Hello everyone, I'm new to both Powerapps and these forums.
I need to create a form in wich I'm able to show/hide a text input field based on the value of a drop down.
Example:
Dropdown1 has the following values (the data source is a list):
Health
Insurance
Other
If I select "Other", I need a text input field to appear so the user can submit another area apart from health or insurance.
I have tried with multiple variations of this formula, to no avail:
If(Dropdown1.Selected.Value="Other", true,false)
Powerapps simple tells me that .Value= is not valid.
Can someone help me resolve this? I've trying for 3 days to solve this and created more problems than solutions.
Thanks in advance.
Solved! Go to Solution.
Hi!
To add on to @RandyHayes reply: if you're using a data source with several columns, in the list box you have to specify which column to display and then in the formula which column to compare to. The formula can be written:
Dropdown1.Selected.ColumnToCompare = "Other"
For example, I use a data source (list if you like) with the following columns:
Id Name InsuranceType
In the list box I display the name, but I want to use the InsuranceType to compare, hence I use:
Dropdown1.Selected.InsuranceType = "Other"
Hope that helps , good luck!
@Anonymous
Welcome to PowerApps and to the community forum.
So, in general (which I believe you have already come to) you want your text input control to be visible or not based on the value selected in the dropdown.
So, indeed you will be looking at the Visible property of the TextInput control.
In there you should have the following formula:
(Dropdown1.Selected.Value = "Other")
Although you can put the If part and the true and false in, you don't need it. The above formula will evaulate to true or false by itself.
Now...why would this not work for you?
This is going to depend on the Items property of your DropDown control. You mention it is from another datasource. If you are using Distinct to get these values, then the dropdown selection will not have a "Value" property, instead it will have a "Result" property. So, the above formula would be (Dropdown1.Selected.Result = "Other)
If there are any other formulas you are using to create the dropdown list items, then please share that so that we can explore further if needed.
I hope this is helpful for you.
Hi!
To add on to @RandyHayes reply: if you're using a data source with several columns, in the list box you have to specify which column to display and then in the formula which column to compare to. The formula can be written:
Dropdown1.Selected.ColumnToCompare = "Other"
For example, I use a data source (list if you like) with the following columns:
Id Name InsuranceType
In the list box I display the name, but I want to use the InsuranceType to compare, hence I use:
Dropdown1.Selected.InsuranceType = "Other"
Hope that helps , good luck!
That's exactly what I needed. Problem was I was referencing the wrong column.
Using "Name" solved it. Preoviously I was referencing "Value", which is not present on my list.
Thanks!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
81 | |
50 | |
38 |
User | Count |
---|---|
303 | |
249 | |
124 | |
73 | |
55 |