- Goal: I have a module that has a button that opens a sale create form and when submitted creates a sale.
- I also have an app that displays all the existing sales in a table and have loaded that create sale module into it.
- Everything is working as expected as far as being able to click the button and create a sale.
- BUT when I create a sale I need to reload the sales table so that the newly added sale shows up. However I cannot seem to find any way to trigger an action in my app based off the successful execution of the module. Can someone point me in the right direction?
Hey there @Justin_Posey,
You can add an input that has "Query" as type. This will create a dummy JS query.
You can now refer to this "query" in all of your module's event triggers, e.g.
In the above screenshot you can see I have my addSales query, and in the success event handler I'm running the getSales query.
Within any app, when you add your module you can decide which query should run in place of getSales:
To sum up:
- You can use input queries in your module that you can then map in your apps
- Module Input queries can be triggered as any other query would be in a normal app
Thanks for the advice!, ill give it a try and see how it goes. It seems like there should be a more straightforward way to determine a module success in app though, maby its a feature they can work on, though I know their backed up atm.
Anyways if this works it will solve the issue for the time being. Thanks again!
1 Like