Module JavaScript not Applied

Functions added to the JavaScript section for a module work while viewing the module, but once it is added to an app- the JavaScript Functions are not in scope anymore.

Here is the function declared on the Module Level:

Here is an error being thrown on the app level:

Does window.updateData work? I've found that things defined in the Javascript section of the app like that almost always resolve that way.

If not, you'll need to create some sort of exposed output from the module that calls updateData. Retool is pretty aggressive at sandboxing components from each other.

1 Like

It's frustrating that it works one way as a module, but then another as an app.

I think the Module's JavaScript portion is ignored entirely by apps.
For now, I put the function on the app level, which works.