Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AnshumanPatnaik
New Member

Unable to extract Data where sharepoint has multiline statement

I wrote a function and used invoke function to pull multiline data from sharepoint. But the problem is that when the data is entered in a single line with hitting the "Enter Button" it appears properly but if the data is stored using multiline created by hitting wnter button it is not coming up at all.

 

For example if I have updated the data like -
The development is complete. Project is now in SIT phase.

This I am able to pull with invoking the function.

 

But when the update is done like -
Development is complete
Project is now in SIT phase.

 

This one I am not able to pull and show as I have hit "enter" to bring the data to the second line.

 

Can anyone please help with this.

11 REPLIES 11
v-sdhruv
Community Support
Community Support

Hi @AnshumanPatnaik ,
Since we didnt hear back, we would be closing this thread.
If you need any assistance, feel free to reach out by creating a new post.

Thank you

v-sdhruv
Community Support
Community Support

Hi @AnshumanPatnaik ,

Just wanted to check if you were able to resolve the issue?
If you need any help, kindly share more details about your data or the error you are getting so that we can assist you better.

Thank You

v-sdhruv
Community Support
Community Support

Hi @AnshumanPatnaik ,

Just wanted to check if you were able to resolve the issue?
If you need any help, kindly share more details about your data or the error you are getting so that we can assist you better.

Thank You

v-sdhruv
Community Support
Community Support

Hi @AnshumanPatnaik ,

Can you please help us with your M Code or the Custom column code you are using here so that we can assist you properly. The screenshots doesnt give much clarity as to what is happening at the backend which is causing the issue.

If possible, can you provide a sample data (exclude sensitive information)

How to provide sample data


Thank you @SamWiseOwl  and @DataNinja777  for your inputs to the problem.

SamWiseOwl
Super User
Super User

Hi @AnshumanPatnaik 

 

Could you add a find and replace on the data before the function runs:

SamWiseOwl_0-1753795365585.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

After invoking the function I am seeing the column with the data that needs to be pulled.

1000071676.jpg

 but here the values are coming as table and some are coming as data.

But if you click on one of the tables like i did below you will see the actual data.

1000071679.jpg

1000071678.jpg

 I need this data as well to be displayed along with other updates

DataNinja777
Super User
Super User

Hi @AnshumanPatnaik ,

 

It appears you're facing a common issue when extracting multi-line text from SharePoint. The problem is that SharePoint wraps each line of a "Multiple lines of text" field in hidden HTML <div> tags when you press "Enter." Your function is likely pulling this raw HTML and only reading the content of the first tag, which is why single-line entries work correctly while multi-line entries do not. To fix this, you need to handle the HTML formatting.

 

If you are working within Power Automate, the solution is to convert the HTML to plain text. After your "Get item" or "Get items" action, you should add the Html to Text action. The dynamic content from your SharePoint multi-line column should be placed into the Content field of this action. Then, in any following steps, you can use the plain text output from the "Html to Text" action, which will have proper line breaks.

 

1. Trigger: When an item is created or modified
2. Action: Get item from SharePoint
3. Action: Html to Text (Input: YourMultiLineColumn)
4. Action: Post a message (Input: Plain text output from step 3)


For those using Power Apps, you have a couple of options. The most direct method is to use an HTML Text control instead of a standard Text Label. You would set the HtmlText property of this control to your SharePoint data, like ThisItem.'YourMultiLineColumnName', and it will render the text with the line breaks intact. Alternatively, if you must use a standard Label, you can convert the HTML to plain text by setting the label's Text property to use the PlainText() function.

PlainText(ThisItem.'YourMultiLineColumnName')

When using this function, it is important to also set the label's AutoHeight property to true so it can expand to display all the lines of text.

 

The underlying reason for this behavior is how SharePoint stores the data. When you input text with a line break, such as "Development is complete" on one line and "Project is now in SIT phase." on the next, SharePoint saves it as HTML code.

<div>Development is complete</div><div>Project is now in SIT phase.</div>

The methods described above correctly parse this HTML, ensuring all your text is extracted and displayed as intended.

 

Best regards,

After invoking the function I am seeing the column with the data that needs to be pulled.

AnshumanPatnaik_0-1753802435775.jpeg

 

 but here the values are coming as table and some are coming as data.

But if you click on one of the tables like i did below you will see the actual data.

AnshumanPatnaik_1-1753802435787.jpeg

 

AnshumanPatnaik_0-1753802581546.jpeg

 

 I need this data as well to be displayed along with other updates

MFelix
Super User
Super User

Hi @AnshumanPatnaik ,

 

What is the custom function you are using? Can you please share some mockup file please.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



After invoking the function I am seeing the column with the data that needs to be pulled.

AnshumanPatnaik_0-1753802435775.jpeg

 

 but here the values are coming as table and some are coming as data.

But if you click on one of the tables like i did below you will see the actual data.

AnshumanPatnaik_1-1753802435787.jpeg

 

AnshumanPatnaik_0-1753802581546.jpeg

 

 I need this data as well to be displayed along with other updates

Hi @AnshumanPatnaik ,

 

Can you please share the M Code for the custom function please. The screenshots do not allow me to see what you are using to get this values.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors