First off, our team is so excited about all the big improvements that have been made lately... Retool is getting so much better!
As we move to a more module based setup, we want to be able to trigger a query inside a module from the parent app. For example: we want to be able to clear all the fields inside the module at once.
It seems like I may be able to do something using these autocomplete functions but they all throw errors and don't behave as expected.
The other option would be to do something by passing in an input value, but I'm not sure how to handle state there (once it's been clicked once, how to reset and let it get clicked again).
Hi! This is super helpful to me right now as I'm working on trying to trigger a module query from the parent app. I think I'll be able to work through it with the text alone, but the screen shots would be super helpful. Unfortunately, they aren't showing up in the response. Would someone from the Retool Team be able to re-add them?
I want to do a similar thing as alex-godin. And the solution seems a bit hacky for what I am trying to do.
I created an 'init' script for my module, setting all the default values whenever the module is opened in the main app. I simply want to trigger this script manually, without relying on input changes.
A big appeal of the of the business plan is the ability to make a lot of small modules, similar to how I would make class in regular coding. The reason I simply want to run init is also because of my coding mindset. In my opinion, a module should work independently of the parent app. Having to create an input field with a query from the parent app to simply run my init script ruins this independence and thus the appeal to make a lot of modules.
It seems my way of working/thinking is wrong though, it there a better way to do this (clear/ init module in parent app without having to create an input in the module for each parent app in which it is used)
EDIT:
Based on this thread, I found a good setup to run module scripts from the parent app which works well for me. Looking forward to share it soon.