dashjoin / platform

Dashjoin Is an Open Source & Cloud Native Low Code Development and Integration Platform that helps teams deliver applications faster 🚀 Uses a data-driven approach inspired by Linked Data to make use of your existing assets
https://dashjoin.com
GNU Affero General Public License v3.0
89 stars 7 forks source link

Need to take query arguments into account when computing query table results - was: Strange Context confusion - showing wrong values in the table. #363

Open pgrill79 opened 1 month ago

pgrill79 commented 1 month ago

I have on one page two tables beside:

image

The date gathering expression of the leftone is: q_coicalculator_getSelectedAnimals with the arguments: {"ids": $.variable.sire}

for the right table it is q_coicalculator_getSelectedAnimals with the arguments: {"ids": $.variable.dam}

So the table should show different values, but it are the same even the variables are different:

Sire Variable: d757f12c-8757-4b04-b4ba-58c5063d65c6 Dam Variable: 8556ad70-cb5a-45dd-b0fa-9ce9f54eee25

Both tables are showing the same record. If you now to a F5 in the browser, the entries are switching to the other value, but again both tables show the same, sometimes the record with id d757f12c-8757-4b04-b4ba-58c5063d65c6 and sometimes the id 8556ad70-cb5a-45dd-b0fa-9ce9f54eee25

Hard to describe this issue, but if you need more information let me know

aeberhart commented 1 week ago

root cause is likely the fact that the two widgets use the same expression (with different arguments)

aeberhart commented 1 week ago

as a workaround, you could simply add a space in one of the expressions

pgrill79 commented 1 week ago

I only have query arguments - as i use a query and no expression. Tried to add some spaces in the argument list, but his has noeffect:

image

Also one more info - the expression with ids is a comma separated list of ids - so the query an return multiple entries. The issue only occures if the amount of rows returned is the same - if e.g. the left query returns 2 results and the right one only one - it is displayed corectly

aeberhart commented 1 week ago

ok - same issue with queries. The workaround there would be to copy the query and use the copy's name for the second widget