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

Marco
Contributor

 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.

1.png

 

2.png

 

3.png

 

1 ACCEPTED SOLUTION

JackLacava
Community Manager
Community Manager

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:

JackLacava_0-1696326628588.png

Button to trigger refresh and page change:

JackLacava_1-1696326695403.png

Combo to choose the parameter value:

JackLacava_2-1696326780907.png

label:

JackLacava_3-1696326805038.png

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.

View solution in original post

4 REPLIES 4

JackLacava
Community Manager
Community Manager

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:

JackLacava_0-1696326628588.png

Button to trigger refresh and page change:

JackLacava_1-1696326695403.png

Combo to choose the parameter value:

JackLacava_2-1696326780907.png

label:

JackLacava_3-1696326805038.png

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.

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
Community Manager
Community Manager

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							

 

Thank you, I will try it to see if it works as I expect.