Skip to main content
Member
September 17, 2026
Question

Text Attribute from the Import not the Profile

  • September 17, 2026
  • 1 reply
  • 13 views

How do I get a text attribute from the import profile vs getting a text attribute from the parent of that import?

1 reply

Member
September 18, 2026

Hi,

Both values come from the WorkflowProfileInfo object — the difference is just which profile you fetch before calling GetAttributeValue.

1) Text attribute from the import profile itself (self):

Dim myScenarioType As ScenarioType = BRApi.Finance.Scenario.GetScenarioType(si, si.WorkflowClusterPk.ScenarioKey)
Dim wfProfile As WorkflowProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, si.WorkflowClusterPk.ProfileKey)
Dim myText As String = wfProfile.GetAttributeValue(myScenarioType.Id, SharedConstants.WorkflowProfileAttributeIndexes.Text1)

2) Text attribute from the parent of that import profile:

Dim wfParent As WorkflowProfileInfo = BRApi.Workflow.Metadata.GetParent(si, si.WorkflowClusterPk.ProfileKey)
Dim myParentText As String = wfParent.GetAttributeValue(myScenarioType.Id, SharedConstants.WorkflowProfileAttributeIndexes.Text1)

A few important things to note:

1) Text values do NOT automatically inherit from parent to child profile.EG: "Houston.Import" is a different profile object from "Houston" — if Text1 is only populated on the parent, GetProfile() on the child will return empty. You have to explicitly call GetParent() to walk up and read it.

2) Don't hardcode the ScenarioType ID — derive it dynamically (as shown above) since text attributes can vary by scenario type, and a hardcoded value is a common cause of the field coming back blank.

3)  Attribute index reference: Text1 = 18000, Text2 = 20000, Text3 = 22000, Text4 = 24000 (or just use the SharedConstants.WorkflowProfileAttributeIndexes enum instead of the raw numbers).

4) si.WorkflowClusterPk works in most BR contexts; in some rule types (e.g. transformation rules) you may instead need args.SubstVarSourceInfo.WorkflowUnitInfo.ProfileName to identify the current profile — same GetProfile/GetParent calls apply either way.

5) If a user doesn't have security access to the parent profile, GetParent() will throw a security access error — there's no supported bypass for that.

6) If you only need the value as a POV selector in a Cube View (not inside a BR), you can skip all of this and just reference |WFText1| directly.

Thanks!
Haritha