Dashboard SQL Parameters

5 posts / 0 new
Last post
Offline
Last seen: 3 years 1 month ago
Joined: 06/18/2014 - 17:59
Dashboard SQL Parameters
English

Hi. I've only been working with Vanilla items for 2 weeks, so I'm still relatively new.

I was trying to gauge the feasibility of creating a dashboard (using FreeDashboard) without going through the middle step of using FreeMetadata. I don't want to use FreeMetadata since some of the data I want to generate is more derived than selected and I already have an SQL script.

However, I don't know how I'd go about adding parameters / prompts in this situation (and having parameters is a "must" for the dashboards I'll be creating).

It doesn't look like its possible, but I figured I'd get a more final answer here. Thanks.

- Scott Sarsfield

Offline
Last seen: 3 years 1 month ago
Joined: 06/18/2014 - 17:59

From Charles Martin (email):

You need to put a where clause with a ? in your sql query.
I give you an example.
Let's guess you have a first listbox with a selection of a productcode and, by selecting a value in this listbox, the user will print out the price by shipping status of the selected product.

First dataset (for productcodes selection) :
select
products.productcode
from products

Second dataset (for price by shipping status print out) :
select
SUM(orderfact.totalprice),
orderfact.status
from orderfact
where orderfact.productcode = ?
group by orderfact.status
You will see that the second dataset now includes a 'parameter_1' which is linked to your 'where orderfact.productcode = ?' clause.
Then, you just have to create the drill links (as usual) in your dashboard.

==

Thanks.

Offline
Last seen: 3 years 1 month ago
Joined: 06/18/2014 - 17:59

I also *just now* discovered that parameters can be added in the select statement, so statements like

select
datediff(day, random_day, reference_day) as "days ago"
from
(select ? as reference_day) as "reference",
dbo.RandomDays

will work with a parameter from DatePicker, which is extremely useful for calculated columns.

However, is there a way to do this in FreeMetaData?

Offline
Last seen: 5 years 5 months ago
Joined: 10/24/2018 - 15:47

nice and thanks for share CHURS

Offline
Last seen: 5 years 4 months ago
Joined: 11/03/2018 - 07:46

Basically this post is relevant to the different type of resources of healthy life in society. All the peoples can joined us through the following shopbop reviews to get the best tips about how to clean your surroundings and environment. Your blog really contains the best content which is impressive.