Transform Data with HTML Tags

Hi. I was searching topics in the Community and came across the following topic pertaining to HTML transformation.

It has been 5 years since the post. Have there been any updates since?

We are trying to utilize EM to transform values with HTML to display as Product Overviews on our site. The following screenshot and attached file contains examples of data that we need to transform into HTML to display properly on our site. Is anyone able to assist? Thanks.

EM Product Overview HTML Sample 07092025.xlsx (10.5 KB)

Hi,

This is going to be really difficult to do - even more so than the example in the post you found. In that post, the main goal was to turn a structured data table into a HTML table. If I've understood your example correctly, you want to turn the unstructured text in "PRODUCT OVERVIEW" into a HTML snippet.

So this:

Don’t discard your surgical instruments—we can repair them! We are fully equipped to handle any stirrup repair in-house, with no limitations. If it’s broken in half, or just parts in a box—we will send it back—working like new!

Please see below for Services to be Performed and distinction between minor/major repair options – 

MINOR REPAIR – Repair & Refurbish
•        Comprehensive inspection and OEM evaluation
•        Assessment for aftermarket (non-OEM) parts to be replaced if they do not meet OEM specs. 
•        Repairs to be performed as needed: inspect, complete disassemble, repair and align main lock, replace internal cams and bearings, repair boot lock assembly, secure main shaft, secure all screws and connections including yellow boot, ensure all functions are smooth with no binding, refurbish all moving parts or replace if corroded or cracked, replace lift assist assembly, replace main lock cover and insert, replace missing handle or knobs, reassemble and align components to OEM specs, refurbish surfaces; repair/replace velcro (if applicable). 
•        Perform safety and function test.
MAJOR REPAIR – Rebuild
•        After a comprehensive inspection and OEM evaluation, your stirrup will be completely rebuilt with new parts. 
•        Services and repairs to be performed: Complete disassemble, aftermarket (non-OEM) parts will be replaced,  rebuild and align main lock, replace internal cams and bearings, replace entire boot lock assembly and upper cylinder bracket, refurbish and secure main shaft, secure all screws and connections including yellow boot, ensure all functions are smooth with no binding, refurbish all moving parts or replace if corroded or cracked, replace lift assist assembly, replace main lock cover and insert, replace pad, replace missing handle or knobs, reassemble and align components to OEM specs, refurbish surfaces; repair/replace velcro (if applicable).
•        Perform safety and function test.

Would become something like this:

<p>Don’t discard your surgical instruments—we can repair them! We are fully equipped to handle any stirrup repair in-house, with no limitations. If it’s broken in half, or just parts in a box—we will send it back—working like new!</p>

<p>Please see below for Services to be Performed and distinction between minor/major repair options – </p>

<h2>MINOR REPAIR – Repair & Refurbish</h2>
<ul>
    <li>Comprehensive inspection and OEM evaluation</li>
    <li>Assessment for aftermarket (non-OEM) parts to be replaced if they do not meet OEM specs. </li>
    <li>Repairs to be performed as needed: inspect, complete disassemble, repair and align main lock, replace internal cams and bearings, repair boot lock assembly, secure main shaft, secure all screws and connections including yellow boot, ensure all functions are smooth with no binding, refurbish all moving parts or replace if corroded or cracked, replace lift assist assembly, replace main lock cover and insert, replace missing handle or knobs, reassemble and align components to OEM specs, refurbish surfaces; repair/replace velcro (if applicable). </li>
    <li>Perform safety and function test.</li>
</ul>
<h2>MAJOR REPAIR – Rebuild</h2>
<ul>
    <li> After a comprehensive inspection and OEM evaluation, your stirrup will be completely rebuilt with new parts. </li>
    <li>Services and repairs to be performed: Complete disassemble, aftermarket (non-OEM) parts will be replaced,  rebuild and align main lock, replace internal cams and bearings, replace entire boot lock assembly and upper cylinder bracket, refurbish and secure main shaft, secure all screws and connections including yellow boot, ensure all functions are smooth with no binding, refurbish all moving parts or replace if corroded or cracked, replace lift assist assembly, replace main lock cover and insert, replace pad, replace missing handle or knobs, reassemble and align components to OEM specs, refurbish surfaces; repair/replace velcro (if applicable).</li>
    <li> Perform safety and function test.</li>
</ul>

As the data is all in a single cell, we'd need some way to programmatically identify where to insert the correct HTML tags using string manipulation functions. This wouldn't be too difficult if all of the overviews were in the exact same format, but the sample you attached shows them with different formats (without bullet lists, with different numbers of bullets, different numbers of paragraphs, etc). And I'm assuming the full dataset will contain many more formats. This raises the complexity dramatically and whilst it may well be possible in theory, in practice it is likely to be a huge challenge.

Now, with that said, if you do want to do this in EasyMorph, I've a couple of ideas/pointers:

  1. The starting point would be to work out the rules needed to work out where to put the HTML takes. For example, replace • with <li>. You can use simple replaces, regex expressions, etc. Basically any of the text function here List of functions [EasyMorph Help]
  2. You may be able to get OK results back from an AI model. You could iterate through the table, sending each description to the LLM using the "Ask AI" action with an appropriate prompt. I gave this a very quick try using:

The prompt was:

Turn the below text into a HTML snippet using paragraph, unordered list, and header tags. Each unordered list item appears in the below beginning with "• ". Make the first line a paragraph and not a header.

And the first entry in your sample resulted in this response:

<p>Don’t discard your surgical instruments—we can repair them! We are fully equipped to handle any stirrup repair in-house, with no limitations. If it’s broken in half, or just parts in a box—we will send it back—working like new!</p>

<p>Please see below for Services to be Performed and distinction between minor/major repair options:</p>

<h3>MINOR REPAIR – Repair &amp; Refurbish</h3>
<ul>
  <li>Comprehensive inspection and OEM evaluation.</li>
  <li>Assessment for aftermarket (non-OEM) parts. To be replaced if they do not meet OEM specs.</li>
  <li>Repairs to be performed as needed: inspect, complete disassemble, repair and align main lock, replace internal cams and bearings, repair boot lock assembly, secure main shaft, secure all screws and connections including yellow boot, ensure all functions are smooth with no binding, refurbish all moving parts or replace if corroded or cracked, replace lift assist assembly, replace main lock cover and insert, replace missing handle or knobs, reassemble and align components to OEM specs, refurbish surfaces; repair/replace velcro (if applicable).</li>
  <li>Perform safety and function test.</li>
</ul>

<h3>MAJOR REPAIR – Rebuild</h3>
<ul>
  <li>Comprehensive inspection and OEM evaluation.</li>
  <li>Stirrup will be completely rebuilt with new parts.</li>
  <li>Services and repairs to be performed: Complete disassemble, aftermarket (non-OEM) parts will be replaced, rebuild and align main lock, replace internal cams and bearings, replace entire boot lock assembly and upper cylinder bracket, refurbish and secure main shaft, secure all screws and connections including yellow boot, ensure all functions are smooth with no binding, refurbish all moving parts or replace if corroded or cracked, replace lift assist assembly, replace main lock cover and insert, replace pad, replace missing handle or knobs, reassemble and align components to OEM specs, refurbish surfaces; repair/replace velcro (if applicable).</li>
  <li>Perform safety and function test.</li>
</ul>

Hope this helps!
Matt

2 Likes

Use Ask AI function and let the GenAI do the work fore you:

Turn the unstructured text below into structured HTML using appropriate HTML tags like (p, ul, li, etc.)

And voila!

Don’t discard your surgical instruments—we can repair them! We are fully equipped to handle any stirrup repair in-house, with no limitations. If it’s broken in half, or just parts in a box—we will send it back—working like new!

Please see below for services to be performed and the distinction between minor and major repair options.

Minor Repair — Repair & Refurbish

  • Comprehensive inspection and OEM evaluation
  • Assessment for aftermarket (non-OEM) parts to be replaced if they do not meet OEM specs
  • Repairs to be performed as needed:
    • Inspect
    • Complete disassemble
    • Repair and align main lock
    • Replace internal cams and bearings
    • Repair boot lock assembly
    • Secure main shaft
    • Secure all screws and connections, including yellow boot
    • Ensure all functions are smooth with no binding
    • Refurbish all moving parts or replace if corroded or cracked
    • Replace lift assist assembly
    • Replace main lock cover and insert
    • Replace missing handle or knobs
    • Reassemble and align components to OEM specs
    • Refurbish surfaces
    • Repair/replace velcro (if applicable)
  • Perform safety and function test

Major Repair — Rebuild

  • After a comprehensive inspection and OEM evaluation, your stirrup will be completely rebuilt with new parts.
  • Services and repairs to be performed:
    • Complete disassemble
    • Aftermarket (non-OEM) parts will be replaced
    • Rebuild and align main lock
    • Replace internal cams and bearings
    • Replace entire boot lock assembly and upper cylinder bracket
    • Refurbish and secure main shaft
    • Secure all screws and connections, including yellow boot
    • Ensure all functions are smooth with no binding
    • Refurbish all moving parts or replace if corroded or cracked
    • Replace lift assist assembly
    • Replace main lock cover and insert
    • Replace pad
    • Replace missing handle or knobs
    • Reassemble and align components to OEM specs
    • Refurbish surfaces
    • Repair/replace velcro (if applicable)
  • Perform safety and function test
2 Likes