Page 1 of 1

multiple datasource

Posted: Wed Dec 14, 2022 2:58 pm
by acataluffi
Hi, i have a dashboard with two tabs.

In the first one, i want all the data in my table.
In the second one, i want get the data from only the last element.

How should I do it? Should I make two different data sources (same table but execute two different queries), or is there a faster and more efficient way?

Thanks

Re: multiple datasource

Posted: Thu Dec 15, 2022 7:43 am
by Lech Kulikowski
Hello,

You can use one data source and on the second tab use filtering for components. The query will be sent once but need to add all filters, and if some changes, all filters should be modified.
Also, you can add two data sources, and use filtering directly in the query. In that case, will be sent two queries on the database server, but if some changes, only the filter in the query should be modified.

Thank you.

Re: multiple datasource

Posted: Thu Dec 15, 2022 8:00 am
by acataluffi
What's will happen if i create a variable Date and add it on a filter?
If i set that variable in the two queries, when i change date each query will update?

Anyway, I don't know why i set the datetime filter but anything refresh. I already do it some months ago and it works fine.

Re: multiple datasource

Posted: Thu Dec 15, 2022 2:59 pm
by Lech Kulikowski
Hello,

Yes, queries will be filtered.

Thank you.