Skip to main content
Newcomer
August 18, 2023
Solved

Data Source - assign Entity from Workflow Profile?

  • August 18, 2023
  • 1 reply
  • 0 views

First time poster here!  I created a data source called Vista that has 4 different entities using it.  Each of those 4 entities has their own Workflow Profile and each entity is “assigned” to their respective Workflow Profile.   In the Data Source, how do I address this in the Entity field?  Is there a formula I can use to pull the Entity name from the Workflow Profile that is selected by the user?  So if the user is importing the “Chicago” entity (which is assigned to the “Chicago” Workflow Profile), can the Data Source somehow read that?

Best answer by chul

If your entities correspond to the name of your WF Profile, you can use the below api on the entity field using a complex expression. You will need to parse it because the full WF name adds ".Import" or whatever you called the step. For example, if your WF is called "Chicago" and the step is called "Import", the name that this api would return is "Chicago.Import". So you can either map that value or parse it to only return "Chicago".

Dim sValue As String = api.WorkflowProfile.Name

Hope that helps and great to see you posting here Cheryl - it's been a while!

chul

1 reply

chulOneStream EmployeeAnswer
OneStream Employee
August 18, 2023

If your entities correspond to the name of your WF Profile, you can use the below api on the entity field using a complex expression. You will need to parse it because the full WF name adds ".Import" or whatever you called the step. For example, if your WF is called "Chicago" and the step is called "Import", the name that this api would return is "Chicago.Import". So you can either map that value or parse it to only return "Chicago".

Dim sValue As String = api.WorkflowProfile.Name

Hope that helps and great to see you posting here Cheryl - it's been a while!

chul

Newcomer
August 19, 2023

That worked!  Thanks Chul!! Hope to see you at Splash next year!