cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
migueldctech
Helper I
Helper I

Visible button

I have a button that i would like to be visible if the text in a datacardvalue contains 1Z, otherwise dont show that button

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

put the following in the Visible property of the button

If("1Z" in DataCardValue1.Text,true,false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
timl
Super User
Super User

Hi @migueldctech 

You could do this by setting the Visible property of the button to:

(DatacardValue.Text = "1Z")
chmoncayMSFT
Power Apps
Power Apps

Hi there,

 

You can use this formula:

(TextInput1.Text exactin "1Z")

 

This will make sure that it's exactly 1 and capital Z, if lowercase z is OK you can use this

(TextInput1.Text in "1Z")

 

Additionally,

 

If you need to find 1Z in a string like THMSX1ZSJED, you can use:

Find(TextInput1.Text,"1Z")

 

Hope this helps!

Pstork1
Dual Super User III
Dual Super User III

put the following in the Visible property of the button

If("1Z" in DataCardValue1.Text,true,false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

RandyHayes
Super User
Super User

@migueldctech 

Set your Visible property on the Button to : 

   "1Z" in DataCardValuex.Text  Replace control name with your control name.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
RandyHayes
Super User
Super User

@migueldctech 

Just keep in mind that you don't need the redundant true and false and an If in a true/false boolean property.  The main part of that formula will already be true or false, adding an If statement to say if something is true, then true, is redundant.  

Just a few less typing steps needed!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
timl
Super User
Super User

@migueldctech 

The others are of course correct - I misread "contains" for equals.

The comment I would have about Randy's formula is that it shortcuts the If statement and is therefore more succint.

Thank you so much, now i can set different buttons for tracking purposes, like UPS/FEDEX.........hahahah...it works, thank you again.

 

Miguel

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,992)