Hi Guys,
im trying to make some text (just the word YES) within a label appear red using the following,
If(Contains("YES",Label9_2.Text)),Red,RGBA(0, 0, 0, 0))
the label contains a few fields that i have concatenated together? is it my code or the because of the concatenate function before the if statement?
Solved! Go to Solution.
Hi @Anonymous ,
Based on the issue that you mentioned, I think the Html text control and the Substitute function could achieve your needs.
I have made a test on my side, please consider take a try with the following workaround:
Set the HtmlText property of the Html Text control to following:
Substitute("Show your Yes or No value", "Yes", "<b style='color:red;'>Yes</b>")
On your side, you should set the HtmlText property of the Html Text control to following:
Substitute(
Concatenate(...), // Type your Concatenate(...) formula here
"Yes",
"<b style='color:red;'>Yes</b>"
)
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
@Anonymous
I am not aware of the function CONTAINS but you can use the IN operator to achieve your goal.
If("YES" in Label9_2.Text, Red, RGBA(0, 0, 0, 0))
---
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."
@mdevaney wrote:@Anonymous
I am not aware of the function CONTAINS but you can use the IN operator to achieve your goal.
If("YES" in Label9_2.Text, Red, RGBA(0, 0, 0, 0))
---
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."
I get an error on the
;
after the concatenate and before the
If("Defect" in Label9_2.Text, Red, RGBA(0, 0, 0, 0))
ive also tried the others & and &&..
@Anonymous
I don't see any ; symbol or concatenation in the code you have provided. Please show a screenshot of the highlighted code with the error message showing.
---
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."
@mdevaney wrote:@Anonymous
I don't see any ; symbol or concatenation in the code you have provided. Please show a screenshot of the highlighted code with the error message showing.
---
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."
Ignore the redacted its just different text column data. (it works great) just cant combine the syntax
@Anonymous
You can only control the text color using the color property. If you put this code in the Text property it would either highlight the entire text red if Defect is found or transparent if not found.
If("Defect" in Label9_2.Text, Red, RGBA(0, 0, 0, 0))
HTML text can be used to highlight only a portion of a text-string but I have no idea how to detect where the position of YES is. Is it always in the same position?
Text before <font color="red"> YES </font> Text after
---
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."
@mdevaney wrote:@Anonymous
You can only control the text color using the color property. If you put this code in the Text property it would either highlight the entire text red if Defect is found or transparent if not found.
If("Defect" in Label9_2.Text, Red, RGBA(0, 0, 0, 0))
HTML text can be used to highlight only a portion of a text-string but I have no idea how to detect where the position of YES is. Is it always in the same position?
Text before <font color="red"> YES </font> Text after
---
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."
Yes. The information from the column is "brought" in by a flow, if the conditions are met to send the flow the words "YES" are at the end of Description 3 below, (there is a generic sentence before YES)
"
"&'Description1'&"
"&'Description2'&"
"&'Description3'&"
"
Hi @Anonymous ,
Based on the issue that you mentioned, I think the Html text control and the Substitute function could achieve your needs.
I have made a test on my side, please consider take a try with the following workaround:
Set the HtmlText property of the Html Text control to following:
Substitute("Show your Yes or No value", "Yes", "<b style='color:red;'>Yes</b>")
On your side, you should set the HtmlText property of the Html Text control to following:
Substitute(
Concatenate(...), // Type your Concatenate(...) formula here
"Yes",
"<b style='color:red;'>Yes</b>"
)
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
User | Count |
---|---|
126 | |
87 | |
84 | |
75 | |
69 |
User | Count |
---|---|
214 | |
179 | |
139 | |
105 | |
83 |