Data Table Block - edit the data in workflow or report

Modified on Tue, 8 Oct at 4:15 PM

The Data Table block enables data editing during both the preparation phase and within the Report app. This functionality allows both report creators and viewers to make manual corrections or add comments directly to the dataset.


Typically, the Data Table block is connected to a report, where data can be easily explored and corrected if necessary. However, as we will demonstrate in this article, it can also be highly beneficial when integrated with other data operation blocks.


At its core, the Data Table block acts as a data container that can be edited and ‘refilled’ with data from other blocks.


Due to its powerful capabilities, proper permission settings must be configured in the Admin section of the application (for multi-user licences, see below).


To add a Data Table block, simply click on the 'Add Block' button or drag it to the desired position within the workflow.




A click on this block in the workflow will display an empty table: by default it is an 8x50 empty table. It is possible to edit the data by double-clicking a cell and entering the text.


After the data inside the Data table block has been edited a pen icon will appear next to the block to reflect the change:

                                                         

To fill the Data table block with the data from another block, simply connect them and click the Refresh button. This operation will load the entirety of the upstream data, and will disregard any edits done previously in the Data table. 


Note that to refill the data table block it is necessary to click on refresh from source: a normal workflow execution (i.e., clicking the play button) will not refill the table.



     

When the execution is complete, the new data can be examined in the block preview tab.


     

Important: You can toggle the ability to edit data in the Data table block by ticking the “editable” checkbox in the options tab. The data will still be refilled from upstream even if the editable checkbox is disabled. 

The data will still be reloaded when refreshing from source.


Another option is to make the data persisted and saved on disk / preserved after restart.

      



By connecting the Data table block directly to a Report block, it is possible to query the data in the table using any combination of views and filters, and edit the data using the EditableTable View. Data edits made in the Table view will be reflected in other views and in the Data Table block.


       

The Data table block can also participate in any workflow execution, and it will provide the records contained in its table to downstream blocks: the records will reflect any edits that have been made (in the workflow block or the Report table).


Note that the Data table block will not behave as all the other blocks during execution: it will not necessarily read the data from upstream blocks, instead it will provide the records that are contained in its table.  In this regard the block behaves as a snapshot of data that can be edited in multiple locations (to load the upstream records into the Data table block you will need to select the block and click on refresh from source: this action will discard any manual edits).


Data Table Block and workflow execution APIs: an example


We can leverage the Workflow execution APIs with the functionality provided by the Data table block. In this section we will explore how to create an Omniscope project whose report allows the user to visualise, edit and publish the data onto an external system, all within the report app.


You can find more information about workflow execution apis here: https://help.visokio.com/support/solutions/articles/42000073133-workflow-execution-rest-apis .



Here is a simple example: the Data table block is loaded with the records coming from a database table, and it is connected to the Report block and a Database publisher block. The goal is to be able to explore and edit the data using the report app and being able to publish the table back to a database table (either the same table as the source, or a different table), all without leaving the report app. 


       


In the report we added the Workflow Execution custom view from the community developed custom views, and configured it so as to execute the Database output block (without refreshing from source):


       



The data can be edited in a Table view (via a double click on a cell):


       

It is possible to check the process is working as intended by pinning the report (pin button from the 3 dot menu inside the Report), and clicking on the Publish Data button, to view the data flowing between the blocks:




N.B. It is important to disable refresh from source, otherwise the data inside the data table block will be overwritten with the data coming from upstream (Database input block in this example), discarding any edits.


A similar example, using files instead of database tables, is available for download at the end of this article.


Shared report editor permission

In shared reports you can control the ability to edit a Data table block via the Shared report editor permission. You can configure it in the Admin app. For more information about permissions see: https://help.visokio.com/support/solutions/articles/42000036489-server-permissioning


       


N.B.

Editing is always disabled when visualising a multi tenant report: https://help.visokio.com/support/solutions/articles/42000067091-multitenant-reports




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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article