Skip to main content
Newcomer
Aug 26, 2022 3:26 PM UTC
Solved

BRAPI rule for getting Text field from Workflow

I'm trying to pull a Text field from a workflow in a transformation event handler rule but ran into an issue.  I originally tried to use api.Workflow.GetWFText1() but that does not work in a transformation event handler rule.  Is there a way to get it using a BRAPI

LeeBAnswer
Contributor
Aug 26, 2022 6:17 PM UTC

Hi,

Try the following

 

Dim wftext1 As String = api.WorkflowProfile.GetAttributeValue(ScenarioTypeID.Actual, SharedConstants.WorkflowProfileAttributeIndexes.Text1) 

 

ScenarioTypeID.<TheScenarioTypeYouHavetheTextPropStoredOn>

 

4 replies

LeeBAnswer
Contributor
Aug 26, 2022 6:17 PM UTC

Hi,

Try the following

 

Dim wftext1 As String = api.WorkflowProfile.GetAttributeValue(ScenarioTypeID.Actual, SharedConstants.WorkflowProfileAttributeIndexes.Text1) 

 

ScenarioTypeID.<TheScenarioTypeYouHavetheTextPropStoredOn>

 

Member
Nov 2, 2022 7:11 PM UTC

Would be a version of this in BRApi ?

 

Contributor
Feb 8, 2023 5:01 PM UTC

So is there a way to get the workflow Substitution Text Setting via a BRAPI?  Would be nice for XFBR type and Data Set type rules.

Expert
Apr 30, 2024 7:15 PM UTC

Montreux  - BRAPI Example for Text1

Dim wftext1 As String = brapi.Workflow.Metadata.GetProfile(si,"GL Data load COPR STD.Import").GetAttributeValue(ScenarioTypeID.Actual, SharedConstants.WorkflowProfileAttributeIndexes.Text1,Nothing)

brapi.ErrorLog.LogMessage(si,wftext1)