appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.93k stars 3.66k forks source link

[Feature]: Accessing parameters passed to query.run() in the query pane #18666

Open sribalajig opened 1 year ago

sribalajig commented 1 year ago

Is there an existing issue for this?

Summary

When I call query.run(), and I want to pass parameters to it, I can do it as follows - query run_param

I can then access the parameter that I have passed in the query editor pane as follows - accessing_params

While trying to access the parameter that I have passed, when I type this.params., I don't see any recommendations for this as well as params. Neither do I know what parameters are being passed to the query - something like "hey, for this query, you have access to X,Y,Z parameters"

Why should this be worked on?

It improves the convenience of writing queries.

Nikhil-Nandagopal commented 1 year ago

@sribalajig tying this to #1911

somangshu commented 1 year ago

@bharath31 why is this tagged to Modules?

bharath31 commented 1 year ago

@sribalajig tying this to #1911

@somangshu Tagged it to modules based on Nikhil's previous comment. I guess Modules could make the this.params experience better by allowing users to define inputs and outputs for entities.

somangshu commented 1 year ago

@bharath31 modules is already doing that. The Inputs and outputs will be available as autocomplete and also we are trying to identify the best naming convention around this.

However, I see the problem is not that. This is regarding the params that are passed to query, this experience is still valid for many users and will help them.

cc @appsmithorg/teammodules

dilippitchika commented 1 year ago

The expectation here is to scale our solution for creating inputs for queries within modules to scale to inputs for queries in the app. Having one experience across the platform will help with learning curve. Since we are setting the standard for inputs in queries, it's better for us to suggest the changes which the data team can implement.

@carinanfonseca please take a look at this. You sit at the intersection of both the areas, please let me know if you think this we should scale modules input collecting solution to queries as well.

ashit-rath commented 6 months ago

@Nikhil-Nandagopal I'm not 100% sure if this belongs to module pod as this seems to an autocomplete issue. As far as modules with inputs are concerned; the requirement seems to be fulfilled. Can we reassign this issue?

Nikhil-Nandagopal commented 6 months ago

@ashit-rath the issue is with autocomplete but we need it because without it modules will fail. So it's upto us to get someone to pick this up (or we do it) else module usability will fail. Could be something @ApekshaBhosale could help us out with?