Populate multiple cells in a database

Hi everyone,

I suspect this is a fairly simple question so my apologies for not being very interesting :slight_smile:

I’ve built a database of 2,500 companies. Peculiarly I would like the same text copy and logo to appear for every company, only the name changes. However, I don’t really fancy pasting the text 2500 times and adding the logo 2500 times.

Is there either a way to popular all the cells at the same time with the same content, or frankly, a more sensible way to achieve what I’m trying to achieve?

So the UX is, search for a company, find the company, click on it, and then (weird I know) every company has the same logo and the same text copy.

Would love some help!

Nathan

Here is my attempt, but I am new to corvid

$w.onReady( () => {
$w(“#myDataset”).onReady( () => {
let count = $w(" #myDataset “).getTotalCount();
$w(”#myDataset").getItems(0, count)
.then( (result) => {
let items = result.items;
items.forEachItem( ($item, itemData, index) => {
/* do your update here, something like the following:
$item(“#repeatedTextElement”)= $item(" #companyName “);
$item(” #repeatedLogoElement “)= $item(” #companyName ");
*/
} );
} )
.catch( (err) => {
let errMsg = err.message;
let errCode = err.code;
} );

} );

} );

Please refer to the following:
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getItems
https://www.wix.com/corvid/reference/$w.Repeater.html#forEachItem