Thanks, yes it is the correct WF profile, scenario type and cube.
In the TLP_ThingPlanningData Connector, here is how I have added/referred to the attributes (however, they seem to appear/reference correct in the Data Source Connector):
Imports System
#Region "Connection and Field List Methods"
Private Function GetCurrentAppConnectionString(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As String
Try
'Get the connection string for the current application
Dim appCon As String = String.Empty
Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
appcon = dbConnApp.ConnectionString
EndUsing
Return appCon
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Private Function GetFieldListSQL(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As String
Try
'Get the SQL string for the valid fields in the Plan table
Dim sql As New Text.StringBuilder
sql.Append("Select Top 1 WFProfileName, WFScenarioName, WFTimeName, Period, Entity, ActivityType, ImpactType, Account, Flow, IC, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, (SUBSTRING(RegisterID, CHARINDEX('/', RegisterID) + 1, CHARINDEX('/', RegisterID, CHARINDEX('/', RegisterID) + 1) - CHARINDEX('/', RegisterID) - 1)) as WBS, Annot2 as Controller, NCode6 as PlanRevenue, Amount As Amt From XFW_TLP_Plan")
Return sql.ToString
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
#End Region
'......................
# Region "Source Data Methods" Private Function GetDataSelectSQL(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As String
Try
'Retrieve the Thing Plan scenario and time to load from stored Settings
Dim tlpScenario As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, "StoredPlanConnectorScenario_TLPT")
Dim tlpTime As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, "StoredPlanConnectorTime_TLPT")
'Replace WF value with actual workflow scenario and time
If tlpScenario.XFEqualsIgnoreCase("WF") Then tlpScenario = ScenarioDimHelper.GetNameFromId(si, api.WorkflowUnitPk.ScenarioKey)
If tlpTime.XFEqualsIgnoreCase("WF") Then tlpTime = BRApi.Finance.Time.GetNameFromId(si, api.WorkflowUnitPk.TimeKey)
'Execute a summary query against the Plan Table
Dim sql As New Text.StringBuilder
sql.Append("Select WFProfileName, WFScenarioName, WFTimeName, Period, Entity, ActivityType, ImpactType, Account, Flow, IC, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8, (SUBSTRING(RegisterID, CHARINDEX('/', RegisterID) + 1, CHARINDEX('/', RegisterID, CHARINDEX('/', RegisterID) + 1) - CHARINDEX('/', RegisterID) - 1)) as WBS, Annot2 as Controller, NCode6 as PlanRevenue, Sum(Amount) As Amt ")
sql.Append("From XFW_TLP_Plan ")
sql.Append("Where ")
sql.Append("(WFScenarioName = '" & SqlStringHelper.EscapeSqlString(tlpScenario) & "') ")
sql.Append("And (WFTimeName = '" & SqlStringHelper.EscapeSqlString(tlpTime) & "') ")
sql.Append(Me.GetWFProfileCriteria(si, api))
'sql.Append("And (WFProfileName Like '" & SqlStringHelper.EscapeSqlString(api.WorkflowProfile.Name.Split(".")(0)) & "%') ")
'sql.Append("Group By Status, WFProfileName, WFScenarioName, WFTimeName, Period, Entity, ActivityType, ImpactType, Account, Flow, IC, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8 ")
sql.Append("Group By WFProfileName, WFScenarioName, WFTimeName, Period, Entity, ActivityType, ImpactType, Account, Flow, IC, UD1, UD2, UD3, UD4, UD5, UD6, UD7, UD8,(SUBSTRING(RegisterID, CHARINDEX('/', RegisterID) + 1, CHARINDEX('/', RegisterID, CHARINDEX('/', RegisterID) + 1) - CHARINDEX('/', RegisterID) - 1)), Annot2, NCode6")
Return sql.ToString
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Private Sub ValidateNoImportFromCentralRegisterProfile(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs)
Try
'Retrieve the name of the Workflow profile used for CENTRAL REGISTER MGMT
Dim registerProfile As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, "StoredPlanRegisterProfile_TLPT")
'Get the stored WFProfile Criteria Value so that we can determine how the Workflow profile criteria is derived
Dim loadingProfile As String = String.Empty
Dim wfProfileCriteria As Integer = CType(BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, "StoredPlanConnectorProfile_TLPT"), Integer)
Dim wfProfileCriteriaType As WFProfileCriteriaTypes = CType(wfProfileCriteria, WFProfileCriteriaTypes)
Select Case wfProfileCriteriaType
Case Is = wfProfileCriteriaType.CentralImport
loadingProfile = api.WorkflowProfile.Name
Case Is = wfProfileCriteriaType.SameProfile
loadingProfile = api.WorkflowProfile.Name
Case Is = wfProfileCriteriaType.ProfileText1Map
loadingProfile = api.WorkflowProfile.GetAttributeValue(api.ScenarioTypeID, SharedConstants.WorkflowProfileAttributeIndexes.Text1)
EndSelect
'Make sure that the user is not trying to load data from the PlanRegisterProfile (Central Register Management Profile)
If registerProfile.XFEqualsIgnoreCase(loadingProfile) Then
'Throw, Not allowed to load cube from the central register management profile
Throw New Exception("Thing Planning: Cannot load data into cube from the Central Register Mangement Workflow Profile '" & registerProfile & "'.")
End If
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Sub
#End Region