lowcoder icon indicating copy to clipboard operation
lowcoder copied to clipboard

[Feat]: Queries in query library need optional parameters (also somewhat Bug)

Open LennardF1989 opened this issue 2 years ago • 3 comments
trafficstars

Sometimes parameters optional, but there is currently no way from the UI to tag a parameter as such.

I tried to use a workaround like this: image

This works fine from the Query Library itself, but when used in an app, it looks like the short hand if is not respected.

LennardF1989 avatar Jul 02 '23 11:07 LennardF1989

I have the same problem. It seems, that the code in the imported query isn't executed at all. If I recreate my query in the project the code works, but it doesn't work if importing the query. In my case it is a Jira Issue Search. I'm using conditional code to add an ORDER BY to the JQL, if certain inputs are set. If executed directly, the query works. From my project I get the default order always. It even ignroes the default values of the inputs.

Banbury avatar Jan 26 '24 08:01 Banbury

In my library queries, i'm using an url constructed like so: https://hostname.com/x-api/v1/cars/{{encodeURIComponent(variableName)}}

and in my case, as others have noted, the query works fine in the library query editor, but fails inside the apps.

It is reasonable to want to control for encoding uri components in a library query where part of the pathname is templated. So, it is definitely a bug in my opinion.

jnewman-eti avatar May 28 '24 15:05 jnewman-eti

We will look and try to offer the solution as fast as possible. Will not ship with 2.4.1 - but surely with the next version.

FalkWolsky avatar May 28 '24 20:05 FalkWolsky

This feature is Done and Deployed to Prod. So, closing out this issue.

adnanqaops avatar Sep 10 '24 12:09 adnanqaops