Hi, I am trying out the scripting side of Seatable and I am having trouble with my code. This is what I have got, but it keeps telling me I have an “error: SyntaxError: Unexpected identifier”
for (let i = 0; i < rows.length; i++) {
let index = i
selectedRow = rows[index]
if copyColumnName1 = base.utils.formatDate(date){
const selectedName = selectedRow[copyColumnName]
const selectedDate = selectedRow[copyColumnName1]
base.addRow(winningTable, {[pasteColumnName]: selectedName, [pasteColumnName1]: selectedDate});
}
};
I am not a programmer so appreciate I might the above completely wrong, but I am willing/ trying to learn. What I am trying to do is for the script to look at each row and if the date in the date column matches todays date then it copies some of the information from that row and puts in another table. Anybody have any advice or tips on what I am doing wrong?