OneStream Business Lists: Member Lists and For Next

Make a List

If you’re new to writing business rules this Blog is for you!  Everyone makes lists.  Especially if you’re going to the store and don’t want to forget the milk, eggs, etc.  When you’re calculating data, you need lists as well.  For example, if you sell products you will need to make a list of the products you sell and if you sell them in different markets, you’ll need that list too.  So how do we do this in a OneStream Business Rule?

The First Step

One way to execute a Business Rule is to call it from a Data Management Step using the Custom Calculate type (shown below).  After naming your DM Step, you need to define your Data Units.  You can bypass the Point Of View.  Finally, you need to define the name of your Business Rule section.  Business Rule name, and, although not necessary, the Function Name and Parameters.  The Parameters, MyProduct & MyMarket, are defined only in the box below and will be utilized in the Business Rule. 

Pro Tip: When you see the word Filter in the Data Units section, you can use extensions such as these.

Creating the Rule

When you run the DM Step, it calls the Business Rule titled “MyBusinessRule” but first we need to create it.

Every Finance Business Rule includes several different Finance Function Types.  You’ll only need the Custom Calculate type.

When we name the Business Rule it automatically appears at the end of the Namespace.  The Function we are calling is from our DM Step, “MyFunction”, shown below.

Let the fun begin!

The above function calls the below Sub procedure below.  The first goal of this procedure is to define our variables.  Also, to create our product and market lists.  See my highlighted notes for further explanation.

Now we get to cycle through each of the lists we defined above.  Then we pull data from a dynamic account and place that data in a different account for each of the products and markets.  Please note the $ before the quotes in rows 65 & 69 which allows us to reference the variables previously defined if they are within the curly brackets {Variable}.




Share This: