cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Trim/Split/Substring...

Hello All,

 

is there any option to take only the names from this:

<div class="ExternalClass7CC34A88FF014B4D972685AE629E50C9">Günther Jürgen<br>Michael Jak<br>Martin Hahn<br>Günther Michael<br></div>

 

If not, is there any option to take the names from this one: 

Günther Jürgen , Michael Jak, Martin Hahn, Günther Michael

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Trim/Split/Substring...

Hi @Fatih1 ,

Where do you store the names within your SP List?

Do you store these names within a Multiple lines text type column (which has enabled "User enhanced rich text" option) in your SP List?

 

I assume that you use a Multiple lines text type column (which has enabled "User enhanced rich text" option) to store the names info in your SP list, is it true?

 

If you want to extract these names from the HTML data as you mentioned, please take a try with the following workaround:

Add a Gallery control in your app, set the Items property to your SP List. Within the Gallery, add a Button/Icon, set the OnSelect property of the Button/Icon to following:

 

ClearCollect(NamesColelction, Split(PlainText(ThisItem.MultipleLineColumn), Char(10)&Char(13)))

Note: The MultipleLineColumn represents the Multiple line text column in your SP List. The ThisItem.MultipleLineColumn formula would return the HTML data as you mentined (e.g. <div class="ExternalClass7CC34A88FF014B4D972685AE629E50C9">Günther Jürgen<br>...).

 

On your side, you may need to type following formula:

ClearCollect(NamesColelction, Split(PlainText('MultipleLineColumn value of a specific item record'), Char(10)&Char(13)))

when you execute above formula, the names would be populated within the NamesCollection.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards.

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Trim/Split/Substring...

@Fatih1 

 

I can show you how to change this text string into a one column table of names

 

"Günther Jürgen , Michael Jak, Martin Hahn, Günther Michael"

 

Use this code create a collection by splitting the names between the comma separator

 

ClearCollect(tblNames,Split("Günther Jürgen,Michael Jak,Martin Hahn,Günther Michael",","))

 

And then load this collection into the Items property of a data table to see the results.

 

tblNames

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

 

 

Highlighted
Helper III
Helper III

Re: Trim/Split/Substring...

The problem is, the Names are Dynamic. They are in my sharepoint list, is there any other way ? If I collect my sharepoint list, the result is the same. 

Highlighted
Super User III
Super User III

Re: Trim/Split/Substring...

@Fatih1 

I don't understand...  it would be great if you could post a screenshot of your Sharepoint List column and then please explain what you are trying to achieve.

Highlighted
Dual Super User II
Dual Super User II

Re: Trim/Split/Substring...

Hi @Fatih1 

 

Since data is in html format 

 

In powerapps to get a colleciton of names just use

 

ClearCollect(colName,Split(PlainText(yourdata),Char(13)))

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Community Support
Community Support

Re: Trim/Split/Substring...

Hi @Fatih1 ,

Where do you store the names within your SP List?

Do you store these names within a Multiple lines text type column (which has enabled "User enhanced rich text" option) in your SP List?

 

I assume that you use a Multiple lines text type column (which has enabled "User enhanced rich text" option) to store the names info in your SP list, is it true?

 

If you want to extract these names from the HTML data as you mentioned, please take a try with the following workaround:

Add a Gallery control in your app, set the Items property to your SP List. Within the Gallery, add a Button/Icon, set the OnSelect property of the Button/Icon to following:

 

ClearCollect(NamesColelction, Split(PlainText(ThisItem.MultipleLineColumn), Char(10)&Char(13)))

Note: The MultipleLineColumn represents the Multiple line text column in your SP List. The ThisItem.MultipleLineColumn formula would return the HTML data as you mentined (e.g. <div class="ExternalClass7CC34A88FF014B4D972685AE629E50C9">Günther Jürgen<br>...).

 

On your side, you may need to type following formula:

ClearCollect(NamesColelction, Split(PlainText('MultipleLineColumn value of a specific item record'), Char(10)&Char(13)))

when you execute above formula, the names would be populated within the NamesCollection.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards.

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,322)