dashjoin/platform

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

Closed this issue · 4 comments

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

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

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

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

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