The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
sfilho
3 years agoNew Contributor III
Getting the Workflow Profile Text1 attribute value using BRApi
I am trying to get the Text1 field value using a Business Rule and put this value in a cube view that is being used as Form.
Does anyone have done this before? Is it possible to get the Text1 value...
- 3 years ago
Yes it is ugly. I could not get this piece working properly:
GetAttributeValue(BRApi.Finance.Scenario.GetScenarioType(si, args.SubstVarSourceInfo.WFScenario.DimId).Id
I replaced with:
Dim wfClusterPK As WorkflowUnitClusterPk = si.WorkflowClusterPk
Dim wfScenarioTypeID As Integer = BRApi.Workflow.General.GetScenarioTypeId(si, wfClusterPK)
Dim sVarStep2 As String = BRApi.Workflow.Metadata.GetParent(si, args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000)
It brought the correctly value.
MarkHoughton
2 years agoContributor
Hi,
A few months ago I used the recommended solution of
Dim wfClusterPK As WorkflowUnitClusterPk = si.WorkflowClusterPk
Dim wfScenarioTypeID As Integer = BRApi.Workflow.General.GetScenarioTypeId(si, wfClusterPK)
Dim sVarStep2 As String =BRApi.Workflow.Metadata.GetParent(si,args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName).GetAttributeValue(wfScenarioTypeID, 18000)
And it gave me the correct value I was expecting, however, since moving to 7.3.1.14520 my cubeview BR will not retrieve the Text1 value from the WF.profile. Has the "18000" id value changed in this version ?
If I hard code my WF.Text1 value into my BR I can still pull my UD4.Textx value which alters by time and scenario, so unusual that the WF profile Text1 is not pulling through. I have tried recompiling as well as amending the variable names to see if that will kick it back to life.
Any thoughts as to why it will not work ?
Regards
Mark
JackLacava
OneStream Employee
2 years agoHave a look in the backend database tables, they should tell you if that ID has changed.
- MarkHoughton2 years agoContributor
Hi,
I tried searching through the database tables, but could not find anything relevant. I don't understand why the code worked to retrieve the Text1 field value a few months ago but does not work now. Nothing has changed in the Business Rule.
- JackLacava2 years ago
OneStream Employee
Table WorkflowProfileAttributes will have the relevant properties, search for the value in the ProfileAttributeValue field to identify the record and then use the related AttributeIndex value.
- MarkHoughton2 years agoContributor
Hi,
Well that confirmed it is still an index of 18000 for Text1, so I am at a loss now as to why the main script will not pull that value through. I cannot even get it to resolve for an errorlog entry. It just reports as 0. If I hard code my variable in my subsequent section then the rest of the code does what I expect and pulls a date specific value from the Text1 field. Very confusing.
Related Content
- 1 year ago
- 4 years ago
- 2 years ago