Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Multiple Cells to Bullet List in Rich Text Field

Topic Labels: Scripting extentions
176 1
cancel
Showing results for 
Search instead for 
Did you mean: 

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