cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Courtney
Helper V
Helper V

Button Visible If number is lover than

Hi all.

 

So I have 3 text entry boxes. 

 

If any of the boxes has a number lower than 5 entered I would like the button to become visible. 

 

1.png

 

If the number entered is anything higher than 5 it should remain invisible. 

 

Any ideas on this?

1 ACCEPTED SOLUTION

Accepted Solutions

Hey Courtney,

 

Matthew got you most of the way there, but I think I see what you're looking for:

 

 

 

 

If(
   (!(IsBlank(TextInput1a.Text)) && Value(TextInput1a.Text) < 5)
   ||
   (!(IsBlank(TextInput2a.Text)) && Value(TextInput2a.Text) < 5)
   ||
   (!(IsBlank(TextInput3a.Text)) && Value(TextInput3a.Text) < 5)
   ,
   true
   ,
   false
)

 

 

 

 

I've attached a POC app, make sure your inputs have a default value that is empty 🙂

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

7 REPLIES 7
mdevaney
Super User
Super User

@Courtney
Put this code in the Visible property of the button.

Value(TextInput1a.Text) < 5 Or Value(TextInput2a.Text) < 5 Or Value(TextInput3a.Text) < 5

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

Thanks for your response. 

 

I tried your formula plus the one below and the button remains visible. 

If(Value(TextInput1a.Text) < 5 Or Value(TextInput2a.Text) < 5 Or Value(TextInput3a.Text) < 5, true,false)

 

I'd only want it to show if any of the text boxes have a number lower than 5 entered. 

@Courtney 

I misread your original post.  Try this in the Visible property of the button.  Do not use any if statement.

 

Value(TextInput1a.Text) > 5 Or Value(TextInput2a.Text) > 5 Or Value(TextInput3a.Text) > 5

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

The formula is accepted but will remain visible no matter the condition. Adding the IF seems to work but the button will remain visible until a number of 5 or more is entered. I'd like the button to be invisible until it detects a number of 4 or less. 

Hey Courtney,

 

Matthew got you most of the way there, but I think I see what you're looking for:

 

 

 

 

If(
   (!(IsBlank(TextInput1a.Text)) && Value(TextInput1a.Text) < 5)
   ||
   (!(IsBlank(TextInput2a.Text)) && Value(TextInput2a.Text) < 5)
   ||
   (!(IsBlank(TextInput3a.Text)) && Value(TextInput3a.Text) < 5)
   ,
   true
   ,
   false
)

 

 

 

 

I've attached a POC app, make sure your inputs have a default value that is empty 🙂

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Updated my previous post, thanks to @mdevaney for pointing out the input names were duplicated! Legend as always 😺

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


@iAm_ManCat 

No problem at all

 

@Courtney 
If the post of @iAm_ManCat works for you please mark it as the solution 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,563)