01-17-2022 06:15 AM - last edited on 05-23-2023 09:32 AM by JackLacava
I am trying to create a dashboard with GridView as the component. In Gridview am using Dataadapter (SQL Query). I want to pass parameter to the GridView when displaying the data in the dashboard.
Can someone help me on this.
Thanks & Regards,
Madesh K
Solved! Go to Solution.
01-17-2022 10:02 AM
Sorry I thought, the gridview is the triggering object, but you are looking for a way to change the query using a parameter.
If you have a sql data adapter, you can use the parameters in the sql script like here:
I hope, this is what you are looking for?
In the sample, Onestream replaces
|!WFProfileCriteria_TCR!|
with the parameter's value:
= 'Houston.Register'
and executes the query with this where statement:
... WHERE XFW_TCR_Register.WFProfileName = 'Houston.Register' ...
01-17-2022 07:24 AM
There is a Bound Parameter option in the sql table editor:
and an Column name for bound parameter option to define the column of the table, that will populate the parameter:
You only can populate the parameter with one column only.
01-17-2022 08:42 AM
Thanks Christian.
Hope this option is available when using SQL table editor. Is there any option available in GridView?
01-17-2022 08:45 AM
yes, these options are in sql table editor and in grid view. The screenshots are from a sql table editor.
01-17-2022 09:00 AM
Hi Christian, i have tried the same in GridView but its not working. Is there any KB article for this to go-through.
01-17-2022 10:02 AM
Sorry I thought, the gridview is the triggering object, but you are looking for a way to change the query using a parameter.
If you have a sql data adapter, you can use the parameters in the sql script like here:
I hope, this is what you are looking for?
In the sample, Onestream replaces
|!WFProfileCriteria_TCR!|
with the parameter's value:
= 'Houston.Register'
and executes the query with this where statement:
... WHERE XFW_TCR_Register.WFProfileName = 'Houston.Register' ...
01-18-2022 01:53 AM
Hi Christian,
Thank you so much. Yes, i was looking for the same. I applied the same in my query and it worked.
Thanks & Regards,
Madesh K
07-27-2023 06:07 PM
Hello,
Is it possible to tie this to a supplied parameter as a delimited list?
Thanks.
Indu
08-04-2023 12:01 AM
Hi Christian,
I have a problem passing parameters with Multiselect=True. I want a list of the column to be passed to process a sql in the BR. Any help would be appreciated.
Thank You,
Indu
08-09-2023 05:01 AM
Did you encapsulate the parameter with brackets?
param = [|!MyParameter!|]
This is needed to prevent the business rule call from misinterpreting the commas in the comma-separated list.
01-17-2022 11:03 AM
It is better to use a Dashboard data set rule when trying to pass parameters into a SQL query. What Christian suggested will work. However, if the parameter is not resolved, this can create errors. Where in which the rule, you can check whether the parameter containssubvars and trigger the SQL or return an empty datatable.
01-18-2022 01:56 AM
Thank you!
Yes i agree your point. I will apply this in my dashboard.