04-06-2022
01:13 PM
- last edited
4 weeks ago
by
JackLacava
I have created a Dashboard Dara Set BR and I am attached in the data adapter. When I am trying to execute the rule am getting 0 data. See below the entity is always passing as None but when I add a log message in the code the variable is passing based on the selection and printing the correct entity. in My CV i also have the FDXentity parameter. Any Idea why it is happening ?
Original Query
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=Data,entityDimName=E#|!FDXEntity!|}
Substituted Query
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=Data,entityDimName=E#None}
Thanks
Krishna
Solved! Go to Solution.
04-07-2022 08:34 AM
Thanks.
I found the Solution & answered my own question
FDX Adapter call
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=FDX_Data_CubeView,entityDimName=AccReconEntity,entityMemFilter=E#|!FDXEntity!|}
Dashboard BR
Dim entityDimName As String = args.NameValuePairs.XFGetValue("entityDimName")
Dim entityMemFilter As String = args.NameValuePairs.XFGetValue("entityMemFilter")
KrishnaS
04-07-2022
08:50 AM
- last edited
a month ago
by
JackLacava
Here is the entire code & Steps. It is kind of very basic
1. Create a CV with the Parameter in this example it is entity.
2. Dashboard Dataset rule is below.
3. Create an Adapter call the BR with the parameters. entityDimName parameter is your entity Dimension in the dimension library. This was the parameter I was missing in the adapter.
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=FDX_Data_CubeView,entityDimName=AccReconEntity,entityMemFilter=E#|!FDXEntity!|}
Case Is = DashboardDataSetFunctionType.GetDataSet
If args.DataSetName.XFEqualsIgnoreCase("ExtractCubeViewTimePivot") Then
Dim cvNameToExtract As String = args.NameValuePairs.XFGetValue("cvNameToExtract", String.Empty)
Dim entityDimName As String = args.NameValuePairs.XFGetValue("entityDimName")
Brapi.ErrorLog.LogMessage(si, entityDimName)
Dim entityMemFilter As String = args.NameValuePairs.XFGetValue("entityMemFilter")
Dim scenarioDimName As String = args.NameValuePairs.XFGetValue("", String.Empty)
Dim scenarioMemFilter As String = args.NameValuePairs.XFGetValue("", String.Empty)
Dim timeMemFilter As String = args.NameValuePairs.XFGetValue("", String.Empty)
Dim nameValuePairs As NameValueFormatBuilder = New NameValueFormatBuilder(String.Empty, args.CustomSubstVars, False)
Dim includeCellText As Boolean = False
Dim useStandardFields As Boolean = True
Dim useGenericTimeColNames As Boolean = False
Dim filter As String = String.Empty
Dim parallelQueryCount As Integer = 8
Dim logStats As Boolean = False
Dim dt As DataTable = BRApi.Import.Data.FdxExecuteCubeViewTimePivot(si, cvNameToExtract, entityDimName, entityMemFilter, scenarioDimName, scenarioMemFilter, timeMemFilter, nameValuePairs, includeCellText, useStandardFields, useGenericTimeColNames, filter, parallelQueryCount, logStats)
If Not dt Is Nothing Then
Return dt
Brapi.ErrorLog.LogMessage(si, entityDimName)
Else
Brapi.ErrorLog.LogMessage(si, entityDimName)
Return Nothing
End If
End If
End Select
04-06-2022 02:38 PM
How are you calling this? Is it part of a dashboard? I see that you are passing a parameter to the rule, so that parameter should come from somewhere. (a combo box or something). When you directly run the adapter it is not going to pick it up.
04-06-2022 02:58 PM
It is a Dashboard Parameter. and it is in my cube view POV.
Dim entityDimName As String = args.NameValuePairs.XFGetValue("entityDimName ",String.Empty)
04-06-2022 03:05 PM
I'm not sure what you are trying to achieve. Why is it going to an adapter to get the data when you already have a cubeview? FDX is used for exports and in business rules. If you need the data adapter to work using a dashboard data set rule then you need a dashboard that has a component that uses the parameter you are passing to the DDS rule.
04-06-2022 04:38 PM
Great. I will figure it out and post my comments. I know I have data in CV but I am trying to use in Dashboard to create a Pivot table. Thanks for your input.
04-06-2022 04:48 PM
You can always do that using a cubeviewmd adapter. I don't think you need FDX for that.
04-07-2022 08:31 AM
FYI. I am trying different options and trying to find which is better BTW I already implemented CVMD. Thanks. I think we are deviating from the topic.
04-07-2022 08:34 AM
Well, the answer was already given. If you are trying to use this from a Dashboard, you need a component to pass the parameter. Have you tried that? I believe the purpose of the forum is to provide you with options that are best.
04-07-2022 06:51 AM - edited 04-07-2022 06:52 AM
Try this
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=Data,entityDimName=|!FDXEntity!|}
and in the Business Rule
Dim selectedEntity as string = args.NameValuePairs.XFGetValue("entityDimName", String.Empty)
Dim entityMemFilter As String = "E#" & selectedEntity
and in the FDX call pass entityMemFilter
04-07-2022 08:34 AM
Thanks.
I found the Solution & answered my own question
FDX Adapter call
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=FDX_Data_CubeView,entityDimName=AccReconEntity,entityMemFilter=E#|!FDXEntity!|}
Dashboard BR
Dim entityDimName As String = args.NameValuePairs.XFGetValue("entityDimName")
Dim entityMemFilter As String = args.NameValuePairs.XFGetValue("entityMemFilter")
KrishnaS
04-07-2022 08:38 AM
You are confusing people with this solution. Why would this work? If it did that means you didn't supply the entity dimension in your FDX call. So it is always better to post the whole thing rather than bits and pieces of it.
04-07-2022 08:51 AM
Stay calm. Updated the entire solution.
04-07-2022
08:50 AM
- last edited
a month ago
by
JackLacava
Here is the entire code & Steps. It is kind of very basic
1. Create a CV with the Parameter in this example it is entity.
2. Dashboard Dataset rule is below.
3. Create an Adapter call the BR with the parameters. entityDimName parameter is your entity Dimension in the dimension library. This was the parameter I was missing in the adapter.
{FDX_CUbeView}{ExtractCubeViewTimePivot}{cvNameToExtract=FDX_Data_CubeView,entityDimName=AccReconEntity,entityMemFilter=E#|!FDXEntity!|}
Case Is = DashboardDataSetFunctionType.GetDataSet
If args.DataSetName.XFEqualsIgnoreCase("ExtractCubeViewTimePivot") Then
Dim cvNameToExtract As String = args.NameValuePairs.XFGetValue("cvNameToExtract", String.Empty)
Dim entityDimName As String = args.NameValuePairs.XFGetValue("entityDimName")
Brapi.ErrorLog.LogMessage(si, entityDimName)
Dim entityMemFilter As String = args.NameValuePairs.XFGetValue("entityMemFilter")
Dim scenarioDimName As String = args.NameValuePairs.XFGetValue("", String.Empty)
Dim scenarioMemFilter As String = args.NameValuePairs.XFGetValue("", String.Empty)
Dim timeMemFilter As String = args.NameValuePairs.XFGetValue("", String.Empty)
Dim nameValuePairs As NameValueFormatBuilder = New NameValueFormatBuilder(String.Empty, args.CustomSubstVars, False)
Dim includeCellText As Boolean = False
Dim useStandardFields As Boolean = True
Dim useGenericTimeColNames As Boolean = False
Dim filter As String = String.Empty
Dim parallelQueryCount As Integer = 8
Dim logStats As Boolean = False
Dim dt As DataTable = BRApi.Import.Data.FdxExecuteCubeViewTimePivot(si, cvNameToExtract, entityDimName, entityMemFilter, scenarioDimName, scenarioMemFilter, timeMemFilter, nameValuePairs, includeCellText, useStandardFields, useGenericTimeColNames, filter, parallelQueryCount, logStats)
If Not dt Is Nothing Then
Return dt
Brapi.ErrorLog.LogMessage(si, entityDimName)
Else
Brapi.ErrorLog.LogMessage(si, entityDimName)
Return Nothing
End If
End If
End Select
01-04-2023 07:43 PM
Hi ! Could you please specify if the E#|!FdxEntity!| should be written somewhere in the cube view ? Is it a dashboard parameter that you have created ?
Regards,
01-04-2023 08:18 PM
It is a Dashboard Parameter which is passing the entity as a parameter.