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 / Using Yes/No (True/fal...
Power Apps
Unanswered

Using Yes/No (True/false toggle) column for next buttons visibility

(0) ShareShare
ReportReport
Posted on by 1,625

Hi All,

 

I'm trying to hide my next button depending on a hidden status column value. I.e. I only want the next button to be visible after this part of the form is submitted (this stage of the form is at stage 3 of completion).

But the status column is picking up its value from a yes/no field (Toggle True/False). I believe there is no way in PowerApps to set a the toggle to be blank by default?

If there isnt, this is what I'm trying to achieve, but as my toggle is always no (false) the dropdown status column always has a value

I have this on my visible property of the button:

If(DataCardValue162.Selected.Value = "Complete" || DataCardValue162.Selected.Value = "Complete - Requires Approval", VarUser = Reviewer1)

 

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Try this if you want the visible of the button:
    DataCardValue162.Selected.Value = "Complete" || DataCardValue162.Selected.Value = "Complete - Requires Approval"

    That is remove the If.

    If i may ask what is "VarUser = Reviewer1" for?

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Lefty Profile Picture
    1,625 on at

    HI @eka24 

     

    Sorry I should have mentioned I want it to be visible if VarUser is Reviewer1  and the function I had works as its hidden the next button for other users, but issue is, the toggle is always going to be set to a value of yes/no so I can't get this to be hidden for Reviewer1 if they havent completed the section as my dropdown is always going to have a value as the toggle always has a value.

     

    But I've now realised I need another condition on the Visible property of that same button, where If VarUser is MYEMAIL or another user it should also be visible regardless of the value found in the above function, but cant get that to work:

     

    VarUser = "MYEMAIL" || VarUser = DataCardValue90_1.Selected.Email; //cant use semi colon or comma here, neither work
    If(DataCardValue162.Selected.Value = "Complete" || DataCardValue162.Selected.Value = "Complete - Requires Approval", VarUser = Reviewer1)
  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Lefty ,

    Could you describe more clearly about when will the button be visible?

    Firstly, let me explain the value of drop down and Toggle.

    Actually, the value of Toggle will never be empty. It could only be true or false.

    The value of drop down will always be one item of its Items. If there's no empty item in its Items, it will never be empty value.

    To distinguish whether you've made selection in the control, I suggest you use combo box.

    Combo box could be empty value, even its Items have no empty value.

     

    I assume that you want:

    1)the button is visible:

    VarUser = "MYEMAIL" || VarUser = DataCardValue90_1.Selected.Email;

    DataCardValue162.Selected.Value = "Complete" || DataCardValue162.Selected.Value = "Complete - Requires Approval"

    2)the button is invisible:

    VarUser = Reviewer1

     

    If so, please set the button's Visible like this:

    If(
     VarUser = "MYEMAIL" || VarUser = DataCardValue90_1.Selected.Email||
     DataCardValue162.Selected.Value = "Complete" || DataCardValue162.Selected.Value = "Complete - Requires Approval",
    true,
    VarUser = Reviewer1,
    false
    )

     If you change DataCardValue162 to combo box, you need to SelectedItems, like this:

    If(
     VarUser = "MYEMAIL" || VarUser = DataCardValue90_1.Selected.Email||
     "Complete" in DataCardValue162.SelectedItems.Value || "Complete - Requires Approval" in DataCardValue162.SelectedItems.Value,
    true,
    VarUser = Reviewer1,
    false
    )

     

    If you still have problem, please describe more clearly about when the button will be visible, when the button will be invisible.

    Actually, I could not fully understand. What's more, if you want to get current user's Email, you need to use User().Email, not "MYEMAIL".

     

     

    Best regards,

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard