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 Apps
Answered

Visible button

(0) ShareShare
ReportReport
Posted on by 30

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

Categories:
I have the same question (0)
  • timl Profile Picture
    37,262 Super User 2026 Season 1 on at

    Hi @migueldctech 

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

    (DatacardValue.Text = "1Z")
  • chmoncayMSFT Profile Picture
    Microsoft Employee on at

    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!

  • Verified answer
    Pstork1 Profile Picture
    69,599 Most Valuable Professional on at

    put the following in the Visible property of the button

    If("1Z" in DataCardValue1.Text,true,false)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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!

  • timl Profile Picture
    37,262 Super User 2026 Season 1 on at

    @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.

  • migueldctech Profile Picture
    30 on at

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

     

    Miguel

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard