export function ProductsServices_beforeInsert(item) {
const fieldValue1 = item.makeNew; // Replace ‘field1’ with the name of your first field
const fieldValue2 = item.model; // Replace ‘field2’ with the name of your second field
// Concatenate the values
const concatenatedValue = fieldValue1 + " " + fieldValue2; // You can adjust the concatenation as needed
// Update the item with the concatenated value before inserting it into the collection
item.makeModel = concatenatedValue; // ‘concatenatedField’ is the name of the field where the concatenated value will be stored
return item;
}
Error loading web module backend/data.js:
e[31mxe[0m Expected ‘;’, ‘}’ or
,-[e[36;1;4mbackend/data.jse[0m:17:9]
e[2m17e[0m | model: “model”,
: e[31;1m ^e[0m
`----
Error:
e[36m>e[0m This is the expression part of an expression statement
,-[e[36;1;4mbackend/data.jse[0m:16:9]
e[2m16e[0m | e[31;1m,e[0me[31;1m-e[0me[31;1m>e[0m make: “make”,
e[2m17e[0m | e[31;1me[0me[31;1m-e[0me[31;1m>e[0m model: "model", ----
Caused by:
0: failed to process input file
1: Syntax Error
Error loading web module backend/data.js:
e[31mxe[0m Expected ‘;’, ‘}’ or
,-[e[36;1;4m/user-code/backend/data.jse[0m:17:9]
e[2m17e[0m | model: “model”,
: e[31;1m ^e[0m
`----
Error:
e[36m>e[0m This is the expression part of an expression statement
,-[e[36;1;4m/user-code/backend/data.jse[0m:16:9]
e[2m16e[0m | e[31;1m,e[0me[31;1m-e[0me[31;1m>e[0m make: “make”,
e[2m17e[0m | e[31;1me[0me[31;1m-e[0me[31;1m>e[0m model: "model", ----
Caused by:
0: failed to process input file
1: Syntax Error