4 weeks ago
Hi all,
I am baffled as to why I am unable to retrieve the Text2 ( or 3 or 4 ) attribute value in a workflow profile. I use the following code to get the Text1 value :
However, if I substitute 20000, 22000 or 24000 as the attribute it will not apply this in the business rule. I have checked the database tables and the values are there with those attribute values and the scenarioTypeId is set to 0 for Actual.
Here is the database filter, so the value are there, but why even I hard code the scenariotype as 0 will it not retrieve these values for me. At present, am only just trying to get them to show in the error log.
I am running the cubeview from the workflow profile, previously I found when trying to pull in Text1 that it would give intermittent results if I ran from the cubeview builder rather than from calling the cubeview whilst in a WFProfile.
Any thoughts please ?
Regards
Solved! Go to Solution.
4 weeks ago
You have this code:
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000)
Instead of 18000 you use SharedConstants.WorkflowProfileAttributeIndexes.Text2
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, SharedConstants.WorkflowProfileAttributeIndexes.Text2)
4 weeks ago
I'm sorry, can you clarify exactly what type of rule this is? Is it a Cube View Extender? A Custom Calculate? Or what?
4 weeks ago
Hi,
From a cubeview I want to send certain information about the workflow, I know I can send |WFText2| as a parameter to the business rule and I can work from that, but I wanted to understand why it is that inside a business rule I can retrieve using VBScript the Text1 attribute, but am not able to get the Text2 or 3 or 4 attribute, even though the syntax I have used ( or would have expected to work ) is not working. If the index values from the database are 18000,20000,22000 & 24000 for Text1,2,3 & 4, then how come I cannot substitute those index values and retrieve the contents even though the database shows they exist.
Cheers
4 weeks ago - last edited 4 weeks ago
It's still not clear - what does "from a CubeView" mean - is it a Cube View Extender you are writing? A dynamic Member Formula? A Dashboard Extender? Can you give us a screenshot of the client while writing the rule?
I'm not trying to be awkward: the question is because you're relying on si.WorkflowClusterPk to identify the workflow profile, but depending on context, this might not actually be what you think it is.
4 weeks ago
Instead of the actual numbers try using the constants: SharedConstants.WorkflowProfileAttributeIndexes.Text1 etc
4 weeks ago
Hi,
Thanks for the info, but what is the full syntax to retrieve that ?
Dim myText2item As String = BRApi.Workflow.SharedConstants.WorkflowProfileAttributeIndexes.Text2
That does not work, so what should I have ? There are no samples in the business rule snippets which feature "sharedconstants" or at least all that pop up when you start to type "shar" is related to sharedfilefolders
Cheers
4 weeks ago
You have this code:
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000)
Instead of 18000 you use SharedConstants.WorkflowProfileAttributeIndexes.Text2
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, SharedConstants.WorkflowProfileAttributeIndexes.Text2)
4 weeks ago - last edited 4 weeks ago
Hi,
That works now, although it didn't initially. But just ran it again and it does. So thank you.
4 weeks ago
@MarkHoughton - Here is an another example
Dim wfList As New Dictionary(Of String, WorkFlowProfileInfo)
For Each w As WorkflowProfileInfo In objList
w.GetAttributeValue(ScenarioTypeID.Actual, SharedConstants.WorkflowProfileAttributeIndexes.Text3)
Next