Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Checking whether a multi-line text field in SharePoint is empty

Hi community,
I have a flow that updates a SharePoint list item. I only want to populate the fields with data if every field is blank (I have one single-line text field, and the others are multi-line text). This works fine when I create a new item and leave every field blank; however, if I modify an existing record by deleting text from the multi-line text fields, the process often fails.
It appears that SharePoint saves HTML for the multi-line text field even after the text has been removed. In the below output from a compose action, multi-line text fields 1, 4, 5 should ideally equal null:
  "Single_Line_Text": "Here is some text.",
  "Multi_Line_Text1": "<div class=\"ExternalClass0D7600878D4544FC9EC68343A617615A\"><br></div>",
  "Multi_Line_Text2": "<div class=\"ExternalClass6951CE51D8344950B25A3E11C3E2157D\">This field has text in it.</div>",
  "Multi_Line_Text3": "<div class=\"ExternalClassF1667655C0704D4A93E854B419513FF9\">This field has text in it.</div>",
  "Multi_Line_Text4": "<div class=\"ExternalClassA1A81EDC545240F7AAE557634E6D1F0F\"><br></div>",
  "Multi_Line_Text5": "<div class=\"ExternalClass4E58EDC2662C4CAA8357A076F0D97D85\"><br></div>"


Note that, when editing the field, I can remove the hidden HTML by pressing backspace/delete an additional time, but I know end users won't necessarily do that.


Does anyone have any ideas for removing or working around this HTML to check whether the field is empty?


Thank you!

Helper I
Helper I

I would recommend clearing it using a event handler.

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,214)