How to add row to SharePoint item HTML table (Power Automate)


If you're using HTML tables to display approval history for SharePoint requests, you may have encountered issues with adding new rows using Power Automate. The new SharePoint lists interface breaks the view when adding new rows to the table. The problem lies in the automatic enclosure of the table in `<div>` tags by SharePoint. Simply removing the `</table>` tag won't solve the issue as the `</div>` tag remains, causing the view to break. To properly add new rows, you need to remove both the `</table>` and `</div>` tags before adding the new row, and then add the tags back when storing it back to SharePoint. This ensures clean code and prevents future issues. However, this solution only applies to future tables, and for existing tables, you need to manually add the `</div>` tag item by item.


Article 8m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time