Switch Param and Execute Workflow View

Modified on Thu, 11 Nov 2021 at 10:57 AM

Introduction


The Switch Param and Execute Workflow View is a community view available in Omniscope EVO and can be used to display a list of items from a filtered dataset. Each item is a link, and when clicked, will change a workflow parameter to the selected value and re-execute the workflow.


One of the use-cases is in reports that are designed to allow viewers to explore and drill down into a dataset, then select a drilled-down value which starts a workflow execution that uses the selected value to generate a report about it.



Example

As an example let us create a workflow in which it is possible to select a Ticker from a dataset of stock values. Once selected, a separate part of the workflow will filter records only from the selected Ticker to perform an Adaptive Spline Regression called MARS using the Regression Block. This type of regression is simply a bit more elastic than a linear regression and will follow a curve of stock prices more tightly.


The whole workflow can be explored here:

https://kb.omniscope.me/Public/Views/Switch+Param+and+Execute+Workflow+View/Switch+Param+and+Execute+Workflow+View.iox/


Parameter

First create a parameter called "ticker". Do this by opening a workflow, pressing on the three-dots menu in the upper right corner and adding a project parameter as specified:




Workflow


As data source use the Demo Data Block and select the "Stock timeseries" source.

Demo Block


Directly connect this data source with the Report, it will be used to get a list of all available tickers.


Next, drag and drop a Record Filter and a Regression Block onto the workflow. The filter will be configured to drop all values except those of a selected ticker, and the Regression Block will use the ticker values to create the regression.


Record Filter


Note that the value right of the equals operator is linked to the parameter previously created. In order to link the parameter, click on the little chain badge above it and select the ticker parameter.



Regression

The regression block is configured using Adaptive Spline Regression. Choose "Cubic" line segment as they are a bit smoother than "Linear" segments. Finally, connect its "Plots" output to the Report block. 


Report

A fully configured report can be found here:

https://kb.omniscope.me/Public/Views/Switch+Param+and+Execute+Workflow+View/Switch+Param+and+Execute+Workflow+View.iox/r/Report/


Download and then add the Switch Param and Execute Workflow view, afterwards add a Timeseries View.


Switch Param and Execute Workflow View


Use the Demo Block as the data source for the Switch Param and Execute Workflow View. Next, configure it to re-execute the Filter and Report block and use "ticker" as the Param name, and the field "Ticker" from the Demo Block as param values. This will write the selected values from the "Ticker" field into the "ticker" param once selected and cause the workflow to re-execute the specified blocks.



Timeseries View

The other view is a Timeseries View connected to the Regression block. It should be immediately auto-populated with the correct settings.


Result

It should now be possible to see a list of Tickers in the Switch Param and Execute Workflow View. If a ticker is selected, its value is sent to the workflow, and the Filter and Report blocks re-executed. This should then update the Timeseries View with the results of the regression.



In order to try out more capabilities of the view, add some filters and views that operate on the Demo dataset directly. You will see that it reacts to filters and brushing.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article