Hello. Im building simple app that is submitting form to a sharepoint. I have a drop down menu(Business Justification UAT) in one card and text box(Business Reason) in other card. In the drop down menu I have the option: Other (Please specify below). My goal is if the users selects Other(Please specify below) the text box to appear below and allow the user to input the text. I have managed to find a few posts about this, but for a pity Im not able to make it work properly. The one Im trying to use is:
If(Choices([@aovbg].Business_x0020_Justification_x00).Selected.Value="Other (Please Specify below)",true,false)
but it gives me an error and is not working. Also I have tried this:
If(DataCardKey11.Selected.Value="Other (Please specify below)", true,false)
but both give me an error on .Selected.Value-> Invalid use of '.'
Thank you in advance for the help 🙂
Solved! Go to Solution.
Hi @SectorOMEGA ,
My comment on the control name was because I thought you were referring to the wrong control (which it appears you were).
For the second item, you only need this on the Visible for it to work
DataCardValue1.Selected.Value="Other(Please specify below)"
as the statement either has a true or false result and this will reflect directly in the Visible property of the control.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Try using
... .SelectedItems
instead of
... .Selected.Value
The invalid use of '.' means just that, there's a '.' In the wrong place somewhere. If the above doesn't works use the assistance of the built in intellisense to guide your dog notation selection.
Hi @SectorOMEGA ,
You just need the syntax below in the Visible of the Text box as the true/false resolves itself
DataCardKey11.Selected.Value="Other (Please specify below)"
however the control name you have used sounds like a label, rather than the dropdown.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@Eelman Thank you very much for the info. I have found out I making mistake in the formula and it should look like this(At least to be correct):
If(DataCardValue1.Selected.Value="Other(Please specify below)",true,false)
The formula is correct but the field is never been displayed 😞 It remains hidden even if I choose the correct statement.
@WarrenBelz Im a little bit lost with your comment(Dont get me wrong please) but Im fairly new to powerapps matter
I found it. I was missing one space in the declaration. All working fine with this:
If(DataCardValue1.Selected.Value="Other(Please specify below)",true,false)
Thank you both @WarrenBelz and @Eelman 🙂
Hi @SectorOMEGA ,
My comment on the control name was because I thought you were referring to the wrong control (which it appears you were).
For the second item, you only need this on the Visible for it to work
DataCardValue1.Selected.Value="Other(Please specify below)"
as the statement either has a true or false result and this will reflect directly in the Visible property of the control.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
70 | |
51 | |
41 | |
30 |
User | Count |
---|---|
255 | |
121 | |
99 | |
92 | |
78 |