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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to make visible fi...
Power Apps
Unanswered

How to make visible field required for navigation, when selected value from radio is "other".

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

At the moment the NEXT button on my screen navigates to a different screen if both radios (questions) are not blank.

 

However what I'm trying to do is if radio1 and radio2 are not selected then the textinput field that is not visible - doesn't need to be required to navigate to another screen.

 

I managed to get a field to be visible when selected value from radio if 'other' is selected. This was the code for the visible part on the textinput :

 

If(Radio2.Selected.Value="Other", true, false)

 

On displaymode for my button my code is:

 

If(!IsBlank(Radio1.Selected) && !IsBlank(Radio2.Selected), DisplayMode.Edit, DisplayMode.Disabled)

 

On selected of my button is:

 

Navigate(Screen2,ScreenTransition.Fade)

 

But how can I make the textinput field required only when it is only visible when 'other' is selected on radio2, to navigate to a different screen?

 

Categories:
I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    You cannot make a control required.   You can do a work around though.

     

    What I do is add a 5 point star icon ( 10 x 10 ), color: red.    I add it to the left of the 'required' control and set it's visible property to IsBlank(controlName).

     

    So in your case, you would set your visible property for your icon to IsBlank(Textcontrol) && Radio2.Selected = "Other"

     

    Then set the displayMode property of your button to this:

     

    If(
     Star.Visible,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for your input. I have found an alternative solution that managed to make the control required. by using If Else structure.  This is seen on the code below.

     

    TextInput

     

    Visible

     

    If(Radio2.Selected.Value="Other", true, false)

    Button:

     

    DisplayMode 

     

     

    (If(
    Radio2.Selected.Value = "Other",
    If(
    IsBlank(TextInput4),
    DisplayMode.Disabled,
    DisplayMode.Edit
    ),
    If(
    !IsBlank(Radio2.Selected) && !IsBlank(Radio1.Selected),
    DisplayMode.Edit,
    DisplayMode.Disabled
    )
    ))

     

    OnSelect

     

    Navigate(Screen2,ScreenTransition.Fade)

     

    If anyone else has an optimized version of this code, please let me know.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    I think this is more concise.  See if it works

    If(
     Or(
     Radio2.Selected.Value<>"Other", 
     !IsBlank(Radio2.Selected.Value)
     ) && !IsBlank(Radio1.Selected.Value), DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard