Forum Discussion

Marco's avatar
Marco
Contributor II
2 years ago

How can I change the WFProfile and refresh my dashboard at the same time?

 I have this button that is replacing the value of the WFProfile with one from a parameter (which are all WFProfiles), and what I want it to do is that when I select a value, it updates in the workflow, and that in a label, the newly selected value is displayed. What is happening now is that when I open my dashboard, the menu to select the value is displayed, but when I select it, it doesn't change. I have to press the button again to refresh the workflow, and the label also updates to the new value.

 

 

 

  • Display Components linked to Parameters are evaluated at display time, so you need a dashboard refresh to get things like Labels to update once you change their value. Seems to work here in v.7.4.2. Configuration:

    Button to trigger refresh and page change:

    Combo to choose the parameter value:

    label:

    Now, after I select a value from the drop down, clicking the button refreshes the dashboard (so the label displays the new value) and sends me to the new Workflow.

    I also tested it without the button, by placing the actions directly on the combobox, and it works in the same way.

    Edit: I noticed that things don't work properly if there is anything slightly incorrect - for example, i had my action set to "Change POV" instead of "Change Workflow" but with the Workflow syntax in arguments, and this broke any other action on that component.

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Display Components linked to Parameters are evaluated at display time, so you need a dashboard refresh to get things like Labels to update once you change their value. Seems to work here in v.7.4.2. Configuration:

    Button to trigger refresh and page change:

    Combo to choose the parameter value:

    label:

    Now, after I select a value from the drop down, clicking the button refreshes the dashboard (so the label displays the new value) and sends me to the new Workflow.

    I also tested it without the button, by placing the actions directly on the combobox, and it works in the same way.

    Edit: I noticed that things don't work properly if there is anything slightly incorrect - for example, i had my action set to "Change POV" instead of "Change Workflow" but with the Workflow syntax in arguments, and this broke any other action on that component.

    • Marco's avatar
      Marco
      Contributor II

      Hi JackLacava.
      Is there a way to change the WFprofile of the POV without modifying the workflow being worked on, as currently, when selecting a value, it changes the WFProfile and switches to another dashboard?

      • JackLacava's avatar
        JackLacava
        Honored Contributor

        NOTE: WFProfile is the workflow "being worked on", so if you change it from a Dashboard assigned to a "Workspace" workflow step, the WF view will inevitably switch away to the new one.

        However, if your Dashboard is not being executed as part of a Workspace step, you can switch WFProfile from an extender, in the background, like this:

        ' change the view
        brapi.Workflow.General.SetSelectedWorkflowView(si, "Clubs.Forms", "Actual", "2020M1")
        ' signal to the dashboard that the view has changed. 
        ' Without this, the user would have to manually hit the Refresh Application button
        Dim selectionChangedTaskResult As New XFSelectionChangedTaskResult()
        selectionChangedTaskResult.WorkflowWasChangedByBusinessRule = True
        return selectionChangedTaskResult