repeat task make the same randomString twice

---javascript block code:----
function randomString(e) {
e = e || 32;
var t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",
a = t.length,
n = "";
for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
return n
}
picname = randomString(6)
automaNextBlock({picname})
---javascript block code:----
randomString(6) as screensnap'name , when use repeat task block I find the first picture's randomstring name is the same as the second picture's name
Can you show the file name in the take screenshot block?
Can you show the file name in the take screenshot block?
I write {{dataColumns@column}}.jpeg in the take screenshot block

I write {{dataColumns@column}}.jpeg in the take screenshot block
{{dataColumns@column}} is actually a "shortcut" for {{[email protected]}}, which means it refers to the column column on the first row. That's why the screenshot file name is always the same, to fix this you can use the prevBlockData keyword to refer to the value that the javascript code block return. For example, {{ prevBlockData@picname }}
