sruthy
3 years agoNew Contributor
Parser rule issue
I have a parser rule that works fine for a Budget type scenario but does not read a WFText1 for a Scenario Type 2 .
I am using the below syntax to read the WFText1 property from a parser rule ....
- 3 years ago
You are hardcoding the scenario type ID - the first parameter to GetAttributeValue, so maybe your problem is there.
Also make sure you're actually on the right workflow profile, i.e. "Houston.Import" is different from "Houston" and will not inherit Text values.
This code works:
Dim myScenarioType As ScenarioType = BRApi.Finance.Scenario.GetScenarioType(si, si.WorkflowClusterPk.ScenarioKey) Dim myWorkflow As WorkflowProfileInfo = brapi.Workflow.Metadata.GetProfile(si, si.WorkflowClusterPk) Dim wfText As String = myWorkflow.GetAttributeValue(myScenarioType.Id, SharedConstants.WorkflowProfileAttributeIndexes.Text1) Dim wf1 As New NameValueFormatBuilder(wfText) ' the last bit is not very robust... Dim myValues As String() = wf1.GetValue("GL").Split(",")