Skip to content

[Bug]: Query Parameters/Variables not working #1843

Open
@ScottKemp

Description

@ScottKemp

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am having issues calling a query with parameters via JS.

I have defined a query (query1), and added a parameter (I belive you call the "variables") "variable1" and notification that should show the parameter.

In another JS query, I call the query1:

query1.run( {variable1: "TEST"});

The notification of query1 will not show "TEST", just "Query 1:" So the query is getting called, but the parameter is not getting passed.

When I edit the value of the variable in the right edit box (query1, variables tab) say to "TEST", the notifcation shows correctly "Query 1: TEST"

Image Image Image

Expected Behavior

I expect when I define a variable in a query, then call that query with a parameter (either with JS or through an event dialog), that variable should be passed and viewable by the query.

Steps to reproduce

  1. Make postgres query: "query1"

  2. Add a variable to it: "variable1"

  3. Fill out the query
    a) select {{variable1.value}};

  4. Make another JS query called "caller1"

  5. set it to
    query1.run( {variable1: "TEST"});

  6. query1 will not get the param.

  7. Note this will also fail if you pass the param in an event dialog.

Environment

Lowcoder self host 2.7.2

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions