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

HTML Text

Hi, 

I have a problem with text in html. I want the search text to be underlined when filtering and everything works, but when the user types "lorem" in lowercase it doesn't underline Lorem because it starts with a capital letter. Is it possible to underline all words regardless of their size?

KKKuba_0-1628675809555.png

KKKuba_1-1628675840230.png

Kind regards

24 REPLIES 24
Nogueira1306
Resident Rockstar
Resident Rockstar

Hey! You can try with function Lower() or Upper()

Try that

I tried but I dont know where I should insert this function

Okay. So where you do the search?

I am assuming that you have a gallery in the itens you have something like:

If(
IsBlank(TextInput1.Text);
List
;
Search(List;TextInput1.Text;"Title")
)

So you write this:

If(
IsBlank(TextInput1.Text);
List
;
Search(List;Lower(TextInput1.Text);"Title")
)

Robhcc
Advocate II
Advocate II

Hi @KKKuba , it should go where you have done the check and underlined the word in the HTML text

Can you send me the code snippet of where you have added the underline? Or just the HTML text code?

Sure:

Substitute(
ThisItem.Description,
SearchContent.Text,
"<span style=""background-color:yellow"">" & SearchContent.Text & "</span>"
)

Substitute(
ThisItem.Description,
Lower(SearchContent.Text),
"<span style=""background-color:yellow"">" & SearchContent.Text & "</span>"
)

It doesnt work because in html there are upper and lower case letters, so it doesn't match

Edit:this was in reference to an earlier answer

KKKuba
Helper I
Helper I

I guess I should up or low html text and searchcontent at the same time to match it. 

Is it right?

Yes

 

Substitute(
Lower(ThisItem.Description),
Lower(SearchContent.Text),
"<span style=""background-color:yellow"">" & SearchContent.Text & "</span>"
)

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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