Function resolved to variable in Query Library

Hello, I use Function in query library but it was resolved to variable. The function recognized correctly the day before(without resolved to variable), But when I edit it today, it was resolved to variable. And I can't resume it.

Hey @AnsonHwang!

Where are you defining filterUpdateArrFn? Typically functions can't be passed around through the Retool model and you'll see something like the following, so I'm curious how you had gotten it to work before:

If you can share more about what the function is and how you're using it, it might help for thinking of workarounds as well!

No, I would not pass function to it. I defined filterUpdateArrFn in app's scripts section.

Oh I see, unfortunately preloaded JavaScript isn't supported in the query library and it looks like, as of right now, there aren't plans to do so in the foreseeable future. If you want to have a reusable JavaScript function you might:

  1. Use the preloaded JS in the app where the query is called
  2. Run your query form a Workflow that you can call from your app and build your logic into the Workflow itself

Do either of those options seem like they might work?