
It may be that I am using the wrong method to send variables to the server functions, but if I create execution with one value, and then again with a different value, the function fires with the original value and not the new one.
I have attached a screenshot of how I am getting the variables from the execution.
Thanks

In addition, I have changed code in the function to create a string seperated by "$" to use a " " instead, however the function is still creating strings using "$", so the old code.

How are you executing your function?

btw, you should probably only parse once 😜

You are right, I have changed that now!

Also noticed I have sent the wrong function, that one is working fine, This is the one I am having issues with


Then this is how it is excecuted


If I run the function shortly after each other but with different listid, the function will execute with the first listid, and therefore cause an issue as the document already exists, despite the second listid being sent as the value


you can see here the listid sent is the one on ln 267, but the function returns the wrong listid

Btw, I highly advise against using then. It's much clearer to just using async/try/await/catch

Can you try to use req.payload
instead of process.env?

Ah perfect, that seems to be working now. Thanks for the help!

[SOLVED] Server Functions Caching variables.
Recommended threads
- Server Error when Pushing a Function
Get this ambiguous error when trying to push my function, it's TypeScript using NodeJS 18 ``` ? Which functions would you like to push? get-grades (get-grades)...
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
