Hello everyone,
I want to create a comma separated string of Names of all the items in my webflow collection. Eg Item 1 name, Item 2 name, Item 3 name.
This is so I can have a filter such that if an item name exists (e.g. Item 2 name), do not make a new one, but if it doesn’t exist (e.g. Item 5 name, make a new item)
I have the list items module, an aggregator and a ‘set a variable module’ (to join the names with a comma) however I find bundles and aggregators very confusing.
Every result (item/record) from iterator/list/search/match module will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.
There are other types of aggregator modules, click the below links to find out more:
Thank you. I used a text aggregator but I am having trouble updating the webflow item based on whether or not an item with a name I am searching for exists.
Here is the output of my webflow ‘List items’ module:
[
{
"id": "67075808c1563c137532c762",
"cmsLocaleId": "660402970549ce521ca1d3d2",
"lastPublished": "2024-10-10T04:29:26.393Z",
"lastUpdated": "2024-10-10T04:28:56.573Z",
"createdOn": "2024-10-10T04:28:56.573Z",
"isArchived": false,
"isDraft": false,
"fieldData": {
"slug": "understanding-cms",
"name": "Understanding Content Management Systems",
"update-me": "This article provides a comprehensive overview of content management systems and their importance in modern web development."
},
"__IMTLENGTH__": 2,
"__IMTINDEX__": 1
},
{
"id": "67075808c1563c137532c767",
"cmsLocaleId": "660402970549ce521ca1d3d2",
"lastPublished": "2024-10-10T04:29:26.393Z",
"lastUpdated": "2024-10-10T04:28:56.573Z",
"createdOn": "2024-10-10T04:28:56.573Z",
"isArchived": false,
"isDraft": false,
"fieldData": {
"slug": "best-practices-for-cms",
"name": "Best Practices for Using a CMS",
"update-me": "Learn the best practices for effectively using a content management system to enhance your website's performance."
},
"__IMTLENGTH__": 2,
"__IMTINDEX__": 2
}
]
And here is the content of my update an item module which is unsurprisingly giving an error (after using the aggregator I couldnt reference the webflow list module:
To update an item you need both the item name AND the item slug. So in simple terms, please what is the mapping/function I need to get the Item ID of the cms item that has the name I’m searching for - in this case the name is ‘Understanding Content Management Systems’ 67075808c1563c137532c762