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!