Introduction
Omniscope allows you to create reports and present data using a variety of different charts. Typically a consumer of your report can filter or select elements to explore the underlying data, but they cannot modify the data itself.
It is possible to configure a report so that a user can edit the data. Editing is currently supported in the Table view and the experimental Editable table view.
Important: data editing is a powerful feature and is subject to permissioning, so that only selected users can be 'empowered' to make these changes. Read more here - see Report only editor section.
NOTE: If you have access to a Project you explicitly have permission to edit the data unless it has been disabled in the Data table block itself.
This article describes in detail how to setup and configure editing inside a report.
Scenario
Let's imagine you run a busy estate agency in Dubai. You have many properties on your books and a large number of customers who are searching for their ideal home.
Up to now you've used a spreadsheet to manage property details. Recently you decided to use Omniscope (good choice!) to improve this process. You plan to create a number of different reports to help staff and customers find and shortlist properties based on criteria such as their desired location and the property price.
Setup
Let's start by obtaining the raw property data. If you really are a manager of a Dubai estate agent you can use your own data, however as that's probably not the case, we will need to either create our own data from scratch, or find a dataset on the internet.
In this example we are going to use the Dubai property dataset, hosted on Kaggle.
If you don't already have one, you will need to setup a Kaggle account. You can view and download the data as a CSV file from here:
https://www.kaggle.com/dataregress/dubai-properties-dataset
After downloading the data, create a new Omniscope file and add a File block. Open the File block and navigate to the CSV file. Click the Execute button to import the full dataset and switch to the DATA tab:
The dataset contains approximately 1800 records. Each record represents a property for sale. There are 38 fields populated with information about each property, such as the price, number of bedrooms, quality and features.
Before we continue, we can use the Field organiser block to perform some clean-up. Add a new Field organiser block and connect it to the File block. Change the Id field type from Number to Text. Add a new field Notes. Now let's create our report. Add a new Blank report block and connect it to the Field organiser block.
Your workflow should now look something like this:
Now let's setup the report. Click on the report and add/configure the views. In the example below I've added some Filter views, a Scatter view showing price against property size, a Map view showing the location of the properties and a Table view showing the raw data. I've also added a background image and chosen a new font:
Employees can use this report to find and recommend properties to customers based on their requirements. We could also host the report on our website, allowing customers themselves to browser and filter properties. In the example below a customer is looking for an unfurnished property with a study in Downtown Dubai. They have filtered the data to obtain a shortlist of 14 properties. They can use the scatter to see which properties represent good value for money and the Map view to decide which locations are most convenient. They can now get in touch with the office and arrange for one of our friendly agents to schedule some viewings.
At the moment our report does not support data editing. If we want to modify the data we could open and edit the CSV file, however instead we will enable editing using the Data table block.
Enabling editing
In order to enable editing within our report we need to switch back to the workflow.
Add a Data table block and connect it to the Field organiser block. The Data table block enables editing in both the preparation phase and the report application. You can find more about its functionality here.
Open the Data table block and click on the Refill button to populate the data from the upstream blocks:
You should now see the upstream data populated:
Any report connected to the Data table block will now support editing. We can disable editing at any time by opening the options tab in the Data table block and unticking the Editable checkbox:
But before we create our report, let's consider our requirements.
Editing requirements
In this scenario, let's imagine we have two different sets of requirements, and therefore we want to create two different editable reports:
- We want to create a report where we can edit all the data as we see fit. This includes modifying existing data and adding new fields/rows. In this scenario we are going to use the Editable table view for editing.
- We want to create a report that allows data editing, but to restrict which fields consumers of the report can edit and the values that can be entered. In this scenario we are going to use the Table view for editing.
Let's go ahead and create our reports.
Editing using the Editable table view
For our first editable report we will create a basic report with an Editable table view that allows full unrestricted editing of the data.
In your workflow, add a new blank report block and connect it to the Data table block. Open the report and add an Editable table view:
The Editable table view works just like an Excel spreadsheet. You can double-click on a cell to edit the value:
After editing you can click the Save button to store your changes:
Right click on a column header to insert, remove or rename fields:
Right click on a row to insert or remove rows:
The Editable table view is currently experimental and does not provide any custom styling options. It is useful when you want to provide unrestricted editing of the data for a small set of approved users.
Editing using the Table view
In our second Editable report we will use the Table view to support editing. We will restrict which fields can be edited and the values that can be entered.
Switch back to your workflow and create a copy of the first Report we created (the agent/customer dashboard). Connect the report to the Data table block. Your workflow should now look something like this:
Open the new report.
Although the report does not appear any different, because it is connected to an editable Data table block you can edit data by double-clicking on a cell value:
Hit enter to submit the edit:
At the moment editing is unrestricted. Although we will not distribute this report to our customers, we want to prevent agents from mistakenly changing data in critical fields. Let's start by disabling editing in the Id field.
Switch to either Explore or Design mode and open the sidebar. Click on the DATA tab and locate the Id field. Click on the 3-vertical dots button to open the Field options. Un-tick the Allow editing checkbox:
Repeat this process for other fields that we don't want to allow our employees to edit (for example Neighborhood, Latitude and Longitude).
Now try editing one of the values in these fields. If we double-click on a cell in a non-editable field the value is selected. It should no longer be possible to enter a new value.
We are still left with a number of fields that we want to keep enabled for editing, for example Quality, No_of_Bedrooms. We have decided that agents should be able to modify these if there are incorrect values in the data, or if the property is updating after the time it's first added to our books. However for many of these fields we want to restrict the value that our agents can enter with a set of pre-defined values.
Let's start with the Quality field. In the data there are 4 different values: Low, Medium, High and Ultra. We want to ensure that we restrict editing only to these values.
Open the Field options for the Quality field and tick Restrict editing to ticked values:
Now double-click on a cell in the Quality field. You should see a dropdown instead of a Text field, restricting you to entering one of the defined values.
We now need to re-order these values. Open the Field options again and drag the value order as shown below:
You can restrict editing further by unticking values if you do not want to allow them to be selectable. You can also add new values by clicking on the Add custom value button, for example let's add a new quality value Really really bad:
You should see the new value added to the bottom of the list. Drag it to the top to maintain the quality order:
Now let's try editing a cell value in the Quality field again. You should see the order and new value represented in the dropdown choices:
Click a value to make the edit:
Editing synchronisation
In our example scenario we have now created 3 reports:
- A non-editable report to allow staff/customers to view, filter and search our property data.
- An editable report using the Editable table view to allow senior staff to edit/add data with no restrictions.
- An editable report using the Table view to allow all staff to edit the data with restrictions.
Because both editable reports are connected to the same Data table block, all edits made are synchronised; an edit in one report will be immediately reflected in the other. After you have made the edits in report 2. switch back to report 3 and you should see the new data, as shown below:
Summary and future development
You can enable editing in any report using a combination of the Data table block and the Editable table and Table views. The Editable table view is currently experimental, but provides a spreadsheet-like method for editing that should be familiar to users of Microsoft Excel. The Table view currently only supports editing of single cell values; you cannot add or remove fields or records, but you can restrict which fields are editable and restrict edited values to a set of pre-configured values.
In the future we plan to improve the Table view and Editable table views further, adding more sophisticated editing behaviour. We also plan to roll out editing capabilities to other views such as the Details view, the Map view and the Scatter view.
As always we would love to hear your feedback to help us shape the direction of any future development.
Happy editing!
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article