I created dynamic pages for a collection, and now I want to get the dynamic link from the collection to send it in an email. But the problem is that the dynamic’s field name (which created automatically) is not a valid variable name:
wixData.query("Reminders")
.find()
.then( (results) => {
if (results.items.length > 0) {
for (var i = 0; i < results.items.length; i++) {
let Item = results.items[i];
// Prepare email's parameters
full_params = {
'task_name': Item.title,
'to_name': Item.memberName,
'task_details': Item.message,
'link_approve': Item.link-reminders-title, // reminders/c5e972b0-491a-44dc-8a11-cb8af18b9455
'to_email': Item.memberEmail,
'reply_to': Item.replyToEmail};
For this, I get an error
But I can’t change the field name, cause it’s created automatically by Wix.