Forum Discussion

Cheryl_Lamkin's avatar
Cheryl_Lamkin
New Contributor II
2 years ago

Data Source - assign Entity from Workflow Profile?

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?

  • 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

  • chul's avatar
    chul
    Contributor III

    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

    • Cheryl_Lamkin's avatar
      Cheryl_Lamkin
      New Contributor II

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