I have a button that i would like to be visible if the text in a datacardvalue contains 1Z, otherwise dont show that button
Solved! Go to Solution.
put the following in the Visible property of the button
If("1Z" in DataCardValue1.Text,true,false)
You could do this by setting the Visible property of the button to:
(DatacardValue.Text = "1Z")
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!
put the following in the Visible property of the button
If("1Z" in DataCardValue1.Text,true,false)
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.
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!
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
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
196 | |
46 | |
45 | |
43 | |
36 |
User | Count |
---|---|
270 | |
82 | |
81 | |
75 | |
69 |