Hi
All Im trying to do is concatenate firstName,LastName when displaying, as well show data creation date with time. It should be very simple fix, but Im just not able to crack it
here is the code and the table Im trying to show:
Do let me know how to add pagination too ,from coding .
// For full API documentation, including code examples, visit https://wix.to/94BuAAs
$w.onReady(function () {
});
export function dataset1_ready_1() {
// Add your code for this event here:
$w("#dataset1").getItems(0, 20) //gets 20 items
.then( (result) => {
let items = result.items;
console.log(result.items);
items.map(item => { //loops for each item
if (item.newField) { //makes sure the field is not empty
//item.newField = item.newField.toLocaleTimeString(); //changes the format to only show the time
item.newField = item.newField.toLocaleString('en-GB', { timeZone: 'UTC' });
//
}
})
$w("#table1").rows = items; //populates the table
} )
.catch( (err) => {
let errMsg = err.message;
let errCode = err.code;
} );
}