Current Selection Form in WF Profile

Krishna
Valued Contributor

Hi - Is there an BRAPI to get the current form name from WF Profile ? I was able to get the list of Forms using the below code but I looking for when a user select the form it should return. Let me know if there any BRAPI functions 

 

Thanks

 

						Dim objBRApiForms As XFFormsForWorkflow  = BRApi.Forms.Metadata.GetForms(si,si.WorkflowClusterPk)
						
					
						'Get the List of Required Forms
						Dim listfrm As  List (Of XFFormSummaryInfo) = objBRApiForms.OptionalForms

 

Thanks
Krishna
7 REPLIES 7

RobbSalzmann
Valued Contributor

Have you tried objBRApiForms..CurrentWorkflowStepStatus to see where you are in the process?

Thanks I will try but I am looking to return the current form name 

Thanks
Krishna

TonyToniTone
Contributor II

The XFFormSummaryInfo should be the place where you can grab the name of the Form

TonyToniTone_0-1690203501257.png

This class reveals the properties on the Form template that you can write logic against.  

TonyToniTone_1-1690203640212.png

 

Hope this helps

Tony,  Can you show us where do we get the reference to the runtime instantiated XFFormSummaryInfo object?  The code above looks like it would yield an Object not set to a reference error.

Dim wfClusterPk As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si,"Act_GLLoad.Forms","Actual","2023M1")
'Get Forms
Dim objXFFormsForWorkflow As XFFormsForWorkflow = BRApi.Forms.Metadata.GetForms(si, wfClusterPk)
'Get Required Forms
Dim objlist As List(Of XFFormSummaryInfo) = objXFFormsForWorkflow.RequiredFor



For Each objformlist As XFFormSummaryInfo In objlist
objformlist.Name

Next 
Thanks
Krishna

Thanks I already getting the name but it will not change based on the selection. 

Thanks
Krishna

Tony , this code is creating an error , can you please give the reference for the runtime instantiated 'XFFormSummaryInfo' object?