Dec 16 2016 11:34 AM
I would like to have the user make a selection from a SP choice field, and have other fields either get hidden or displayed based on that selection. Is this scenario possible?
When user selects Option 1 in the first field, "Additional Text entry field 1" is displayed, and "Additional Text entry field 2" is hidden.
Choice Field
Option 1
Option 2
Additional Text entry field 1
Additional Text entry field 2
Dec 16 2016 09:27 PM - edited Dec 16 2016 09:27 PM
Yes. You will just need to add a condition to the OnVisible property of the field you want to hide. The If() function is almost the same as the one in Excel.
It would look something like this:
Textbox2 OnVisible property:
If(DropDownOptions.Selected.Value="Option 1", false, true)
Feb 09 2018 03:54 PM
Along this same line, I'd like to show a date field based on the selection of an item from a choice field. Works perfect when the choice field only allows 1 choice however, my choice field allows multiple selections. So if more than just the one option is selected, it then hides the other field I want to show.
So, the question is how to show the date field based on the inclusion of an option in a multiple choice field. So far, I've only gotten it to work when the option is the last item chosen. Do you see how to make it work when my one option is selected, regardless if others are too?
Visible property of Date field: If(DataCardValue4.Selected.Value in "Assignment Extension", true,false)
Sep 03 2018 11:16 AM
Did you get a response on this? I would like to also know how to do this.
Sep 03 2018 11:46 AM
Bingo! Solution found here:
If("triangle" in MyListBox.SelectedItems.Value, true)
for full details follow:
https://www.c-sharpcorner.com/article/using-listbox-control-in-microsoft-powerapps/
Jun 04 2019 11:22 PM
@Jose Zaldivar I just want to thank you !!!! 🙂 I was looking for this solution
Jan 22 2020 03:30 PM
@Audrie Gordon it's been 4 years since this post and I'm hoping you can help me decipher with the latest PowerApps version as of today. I'm trying to decipher between field names and DataCard names. I have the following details where I want the Previous Version Exam Location card to display when the Update value is selected in the New or Update Course card field (Note: This is all pulling from a SharePoint list).
DataSource: [@'Exam Question Requests']
DataField: "New_x0020_or_x0020_Update_x0020_"
Card name (item in condition): New or Update Course_DataCard1_2
Card name (item to be invisible until condition is met): Previous Version Exam Location (Shared Drive Path)_DataCard1_2
Here's the condition I tried on the Visible attribute for the Previous Version Exam Location card and it doesn't work. I'm not a developer, so trying to get the exact correct condition example:
If(Choices([@'Exam Question Requests'].New_x0020_or_x0020_Update_x0020_).Value="Update", true, false)
Thanks for any tips.
Kris
Jan 22 2020 03:37 PM
@kthayer Okay, I finally found a direct answer in another blog as follows:
If(DataCardValue4_2.Selected.Value = "Update", true, false)
Mar 26 2020 02:41 AM
Jun 23 2021 10:54 PM
@kthayer Thanks for linking to that blog. I am trying to use the same pattern for a similar problem, but seem to be hitting a roadblock. I want the "GPA Phase" data card to be visible only if the option "Language Hours" is chosen from the drop down list as the value for the "Type of Activity" data card.
Here's what I'm using:
IF (DataCardValue11_1.Selected.Value = "Language Hours",true,false)
I'm attaching screenshot as well:
Jun 24 2021 10:27 AM
@tcoates88 , I don't do much support with this form and I'm not a developer. The only thing I wondered is if the "Language Hours" is a problem because it's two words and maybe there's a backend value that puts something between them? Sorry I can't offer much help. Hopefully someone else can chime in who knows what they're talking about. 🙂
Jun 24 2021 10:38 PM
@kthayer thanks for your reply! I was thinking the same thing...just trying to figure out what that backend value might be.
Jun 25 2021 02:07 AM
@tcoates88 in your screenshot the If statement on the Visible property is missing a closing bracket )
Rob
Los Gallardos
Intranet, SharePoint, Website and Power Platform Manager (and classic 1967 Morris Traveller driver)
Jun 26 2021 12:51 AM
@tcoates88 I don't see any problem with the formula you written in your above reply:
If(DataCardValue11_1.Selected.Value = "Language Hours", true, false)
Make sure you are using the correct value ("Language Hours") as given in backend which is case-sensitive. Also, in the screenshot you attached, you are missing closing bracket ")" at the end of formula.
Let me know if this is not working for you or if there is any error, please post the error message here by replying to this message.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.