Top
Top
LibraryEASYProcess Reference Manual 5ProcessesServicesHtmlWorkshopRunDataSource

RunDataSource Overview

RunDataSource is a service that is new to EasyProcess Version 4.8. With the many changes that were made in the new version, a key difference is that auto postbacks on buttons and lists on the page no longer trigger the Datasources to run again. This was a concern because any postbacks were causing unwanted queries to run which cost time and resources to reload the page.

The only input this service takes is DatasourceIds. Consider you have ten datasources on your webpart. You have added a button on the webpart that only needs to interact with one of these datasources. All you have to do is at the end of your logic inside the button process, you add the RunDataSource service and specify the DatasourceId that you have to reload on the page. This way, when the postback is triggered only the mentioned datasource queries are run which saves a lot of time while reloading the page.


RunDataSource Use Example

RunDataSource Use Examples

Basic RunDataSource Use

In this example we are going to be looking at a pair of drop down lists. What we want to achieve is that when the user selects an option from the material class list, the material type list below it should automatically update to show only the material types included in that class.

First we create both fields. The Material Class list just has options to select RAW or SCR. The Material Type list is being loaded from the datasource MaterialTypes shown in the image. Now we switch to AutoPostBack property of the Material Class list to on(Yes). You can see in the image we have added a process to the Material Class list. In this process we simply have the RunDataSource service that contains the ID for the ‘MaterialTypes’ datasource.

Effectively when the user changes the selection on the Class drop down list, this will trigger a postback and run the ‘MaterialTypes’ datasource. Inside this datasource we are checking for all the values that contain the term ‘(RAW)’ or ‘(SCR)’ in them. This is what is received from the MatClass field when the postback runs. Hence we get the effect of the MatType list being filtered on the selection made in MatClass.


Powered by EASYProcess (© 2021 K-Rise Systems, Inc).