Calling module query / javascript function from parent form

hi,
i couldnt figure how to call module update query (sql) from parent form.
anyone have any luck with it?
example: subform1.updateQuery.trigger(); (module subformXXX)

i tried to expose the updateQuery as output by name fnUpdateQuery={{updateQuery}}
but when i call subform1.fnUpdateQuery.trigger(), it does not work

Hey @mercstudio! The best/only way to trigger a query inside a module FROM the parent app would be to use this workaround:

  1. Create a module input (setting on the left side of the module) and set the value to be the parent query or the parent input that you want to use to trigger the module query
  2. (a) Query JSON with SQL dummy query (b) select * from - this watches for changes to input1 and triggers this query on any changes (c) trigger target module query on success

Then in your parent app, just make a change to whatever you set input1 to (in the module) and you should see the module query get triggered!

Let me know if you're able to get this set up!

After this step, how do I use query1 to be used for example on a select field mapping?

Hey @Snehal, can you share a bit about how you have this set up? You should be able to reference the query data in the module. If you want to reference the module query data in the parent app, you need to set it as a module output. We have some docs on all of this here.