language
Call Us: 1-800-497-0151

Controlling Data Input on a Cube View using a Finance Business Rule

How to Lock or Unlock Individual Data Cells in a OneStream Cube View

  • , Consultant

OneStream Controlling Data Input

The Use Case: I had a cube view that needed to selectively turn on or turn off data input to specific data cells in the cube view based on certain criteria. Yes, there is the Modify Data property for the entire cube view as well as for individual columns in the cube view. However, what if you want to turn on or off input to specific data cells within a data column? Yes, it can be done!

The Solution: For this issue I decided to use Cube Business Rules, specifically Conditional Input. Conditional Input Finance Business Rules control data input by making a data cell read-only or not based on logic in the business rule. They need to be attached to the cube and fire every time a cube view is rendered. Keep in mind that since they fire for every cell in a data retrieval that performance must be a high priority. However, they allow for a code driven approach to controlling the read/write status of a data cell.

How To:

1. Create a Finance Business Rule and assign it to your cube. Under the cube properties there is a business rule section, assign it here. In my example I assigned it to Business Rule 8 (it will fire last in order).

OneStream Cube Properties

Example of the Finance Business Rule, using the Conditional Input Case.

Conditional Input Finance Business

2. Create your Cube View. For this example, I want to set the conditional input status for specific accounts in the “Feb 2021” data column. I want some data cells in this column to be locked to data entry, but not all. That’s why I can’t just use the cube view “Can Modify Data” property since that applies to the entire data column.

Cube View Example

3. Ensure that the Can Modify Data property is set to True. Further access will be determined by the Conditional Input Finance Business Rule.

Cube View Modify Data Property True

4. In the Conditional Input Finance Business Rule I need to test for several conditions, both Time and Account. I accomplish this using api calls such as api.pov.time.name or api.pov.account.name and assign their value to variables.

Conditional Input Rule Api POV Time Account Variables

5. The next step is to conditionally test the contents of these variables and change the data input status of the data cell accordingly. For this example, I am modifying the data input status if Time equals 2021M2 and Account equals A_6002A.

Conditional Input If Time

6. Then I need to return the conditional input type using ConditionalInputResultType and give it a value of NoInput.

Conditional Input Return No Input Code

Conditional Input Business Rule

Notice how a data cell has a property in its Cell Status of Ready Only with a value of true or false. This is what the code changes.

Cube View Cell Status - Read Only True

Now when the cube view is run the cell data meets the criteria in the business rule is now a read only data cell.

Cube View Final Result - Locked Cell

As a final reminder, always keep in mind that this rule will run for every data cell that is retrieved so performance of your code is essential. However, it gives you the ability to really fine tune data access down to individual data cells!

Contact MindStream Analytics

Want to learn more about OneStream Software? Please complete the form below and we'll get back to you shortly.


Featured Webinar

OneStream Power BI Platform

Join us for a compelling webinar as we delve into the revolutionary capabilities of OneStream Software for corporate performance management (CPM).

OneStream: The Power of One Platform for Intelligence Finance

Partner SpotLight

OneStream Diamond Partner

OneStream CPM

OneStream aligns to your business needs and changes more quickly and easily than any other product by offering one platform and one model for all financial CPM solutions. OneStream employs Guided Workflows, validations and flexible mapping to deliver data quality confidence for all collections and analysis while reducing risk throughout the entire auditable financial process.

OneStream Profile