web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional visibility...
Power Apps
Unanswered

Conditional visibility and clear text box

(0) ShareShare
ReportReport
Posted on by

I have a screen that has a combobox with a yes/no choice. If the value of the combobox is "Yes", then I want another text control to be visible and required. This is working fine. However, when someone changes the combobox to "No" from Yes, I want the other text control to clear its contents and then hide.

The visible part is working correctly, but I can not get the contents of the text control to clear out when the combobox is changed to No.

For example, I have a combo box of "Is someone else completing the work?". The answer is yes or no. If yes is selected, another control called "Who is completing the work" appears. When someone goes back and changes "Is someone else completing the work?" to a No, I want the other text control to clear because the last saved response is no longer valid and the text control should be blank.

Any suggestions?

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @AnnetteM 

    The visible part is easy, just have the text controls Visible property Combobox.Selected.Value = "Yes"

    To clear the box, you can use the OnChange property of the combobox: Reset(TextInput.Text) and make the Default property of the TextInput Box: Blank()

  • AnnetteM Profile Picture
    on at

    I am not getting this process to work. Although the field in the datacard appears to be empty, the data in the underlying SharePoint list is not committing the blank value to the column. I still see the text when it was a Yes. So, it appears the only thing this changes is what appears in the column in the form, not the datasource. Any ideas?

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @AnnetteM 

    Check the Update property of the card containing the textbox control and make sure it is referencing the correct control.  If that doesn't work, the card may be corrupted and you can delete it and add it in again to see if it works right. 

  • AnnetteM Profile Picture
    on at

    If the combo is yes, the text control is visible and required so I can add data.  When I submit the form, it writes to the SharePoint list the yes value for the combo and all the text I added in the Text control, however the text control on the screen now appears blank -- despite the SharePoint list showing the value. Of course, when I change the combo to no, the text control is hidden, contents written to blank and when I submit the form, the datasource it reflects No in the combo box and a blank value in the text control. 

    So the challenge is showing the contents of the text control when the value is yes. The datasource has it. I checked the default property of the text control and it is Blank() (used to be parent.default). The default of the datacard containing the text control is referencing the correct control.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard