I created a copy of a base with a functioning script block in it (by functioning I mean it works without throwing errors), to tinker with some updates to the script. But when I run the script in this “copy” of my base, I get an error that
sounds a lot like the Script Block is either trying to access the original base ID, or else has an undefined base ID … on second look, it seems to be getting through the async queries at the beginning of the script, right?.. or else it wouldn’t even hit the
output.markdown() before throwing the error… :
Clearly, I don’t have any access to
Wild guess - globalThis is a static variable (like a script variable) that is scoped to the original base and established when you created the script block. Then, you copied the base, and the script block magically came along in that copy process and somehow, this dependency got lost in translation.
Have you tried to create a new script block in the copied base from the exact same code to see if it runs without error?
I just created a copy of a base that contains 12 script blocks and all seem to be running fine.
UPDATE: I must have missed playing with the bad push. Glad it’s resolved.