Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Multiple Cells to Bullet List in Rich Text Field

Topic Labels: Scripting extentions
1115 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_Gotti
4 - Data Explorer
4 - Data Explorer

Hello -

I have a base that manages products for a website through Webflow. I have built and tested a tool that will import products from an XML source from the supplier that my client uses; however, for the product descriptions it gives the bullet list in an array (XML) that provides up to 24 bullets.

I have them mapped and they sync to 24 distinct columns accurately, but now I’m having some trouble navigating how to get those 24 fields converted into a bullet list in the rich text field I have for the “Full Description” - while ignoring empty fields.

Any support or insight would be greatly appreciated!

  • Brian
1 Reply 1

Hi,
consider arr is a variable containing array of fieldnames, values retrieved by usual getCellValue, rec is record

const bulletlist=rec=>`- ${arr.map(fld=>
rec.getCellValue(fld)).filter(n=>n).join(('\n- '))}`

usage example:
await table.updateRecordAsync(rec.id,{'result':bulletlist(rec)})

image