2023.07.24 02:51 AM
I have a data grid which returns the results of queries to different tables, the tables have different schemas.
When I run the query against table 1 the results are returned correctly, if I run against table 2 the results are returned correctly, but if I then go back to querying table 1 then both the results for table 2 (the previous query) and table 1 are shown on screen.
I confirmed that the gateway is returning just the results for table 1.
Because the data grid column names change, depending on the table being queried, the columns tab has just 1 entry, column1 where Data Field Name is set to * and Display Name is set to *. I also have "Keep NonExistent Columns" set to false.
Anyone know how to fix this issue?
2023.07.25 08:42 AM
Hey,
It seems like you are using the correct properties here, I have attached a working demo below just to confirm the database properties. (just change the dropdown selection to change the database columns)
In terms of potential issues, a first port of call is to check the console to see if there are any errors being returned by the queries that may potentially cause an issue. To open up console press control + shift+i
2023.07.25 08:42 AM
Hey,
It seems like you are using the correct properties here, I have attached a working demo below just to confirm the database properties. (just change the dropdown selection to change the database columns)
In terms of potential issues, a first port of call is to check the console to see if there are any errors being returned by the queries that may potentially cause an issue. To open up console press control + shift+i
2023.07.26 02:44 AM
Thanks Kieran, I compared my settings with yours and they are identical to so that was good to verify. You're dashboard worked as expected in my browser. I tried to modify your data source in various ways to repo the error but with no success. I tried adding common columns to both tables, changing the table lengths, adding some character columns etc but I couldnt break it.
I also checked for browser errors on my dashboard but nothing is standing out.
When the issue appears, if I go to edit mode and execute the query (so input arguments are the same) the results returned are as expected, I press apply and the old records vanish. So I am happy the query itself is returning the expected values. Its a very odd one.
I can only conclude that there must be a browser error somewhere that's making the difference on my side. I will probably try to rebuild the dashboard at some point to see if that fixes it.
For now, I have decided to change around my dashboard so that the different tables are viewed in separate data grids, and this may actually be more user friendly also, as it allows users to view both tables at the same time. Thanks again for the help
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.