Forum Discussion

Sergey's avatar
Sergey
Contributor III
3 years ago

Cube View to automatically select Workflow entities

Hi, I am building cube views that should be accessible by several users based on the workflow they are affected to.   These cube views are the same, but each workflow has its own entity. Theref...
  • Cosimo's avatar
    3 years ago

    Is the workflow entity set in the cube view's POV? You can use  E#Root.WFProfileEntities as a member filter to fetch entities that are assigned to a workflow though you need to have the Entity dimension setup as a cube view row or column. 

    Option 2 would be to create a dashboard parameter of type Member List and and set the Member Filter field to E#Root.WFProfileEntities. You then assign this parameter to your cube view Entity POV.

     

    Option 3 like Sudarshan mentioned above is to create an XFBR rule that returns the entity assigned to workflow:

    Dim WfGUID As guid = si.WorkflowClusterPk.ProfileKey 'gets the profile key from user's current workflow
    Dim EntityList As List(Of WorkflowProfileEntityInfo) = BRApi.Workflow.Metadata.GetProfileEntities(si, WfGUID)

    Return EntityList(0).EntityName 'Returns to calling XFBR the 1st entity assigned to workflow.