- My goal:
- To test module inputs during module development
- Issue:
- I select a test query as the input value for a query input called onEditCollection
- I click an edit button, that triggers onEditCollection
- Retool tells me no query was provided by onClickEdit
- surprised pikachu
- Steps I've taken to troubleshoot:
- reloaded the window
- changed the test input to another query, same result
- if I hook up the edit button to my test query directly, it does what I expect, but when I provide my test query as an input query, it doesn't work. It did work at some point, I thought, so I might be doing something wrong.
- Additional info: (Cloud or Self-hosted, Screenshots)
Self-hosted, Retool version 3.178.0
Test input provided:
Edit button wired up to onEditCollection input:
Lies and slander:
I'm not sure what bumping etiquette is but can anyone share if they are successfully using test queries while building modules? I'm encountering this on every module I build with query inputs, and it's making debugging pretty troublesome.
Hey @Mark_Slade - thanks for reaching out and for your patience! We generally want to give the community a few days to answer before jumping in, depending on the perceived severity and impact of the issue.
I just tried replicating the setup that you described above and didn't have any issues, which makes this significantly harder to diagnose. Have you tried creating additional query inputs and assigning them test values to see if this is consistent?
1 Like
Thank you for getting back. I have encountered this behavior on two of my modules, so I thought it was consistent, but I just tried it on a brand new module and everything worked as expected. I've rewritten this post three times because the behavior keeps changing, so I'll just summarize the various behaviors I've seen for posterity.
- In my working module, it behaved as above with test inputs not working. I tried reassigning the test input, reloading, no luck.
- I added a new test button below the table and set its click handler to use the new test input. It worked (!!). It was configured the same as my table cell's click handler, which did not work.
- I changed the table cell's click handler to use the new test input, it worked (!!)
- I changed the table cell's click handler back to its original test input, it worked (!!)
I dunno. I wish I knew why it didn't work, then did. If it's something I did wrong, I'd like to change my behavior so I don't run into this again. I've encountered this in two different modules.
Marking this solved since the problem is gone and I don't know what conditions caused it to begin with.
Now it's back to not working again. Creating new inputs, new test queries, assigning them all over the place, no combination will work for me now in my working module.
Assuming what you see in my screenshots above is correct configuration, this feature is broken for me. It would be useful to me but I've spent a lot of time trying to figure it out and it's unfortunately eluding me, so I have to admit defeat.
Dang.
Do you mind sending me a JSON export of the module that you're working with so that I can take a closer look? Ideally one with hard coded query results.
And I'll keep this topic open so that other community members can jump in if they ever see anything similar.