lowcoder
lowcoder copied to clipboard
[Feat]: Queries in query library need optional parameters (also somewhat Bug)
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:
This works fine from the Query Library itself, but when used in an app, it looks like the short hand if is not respected.
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.
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.
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.
This feature is Done and Deployed to Prod. So, closing out this issue.