Page 1 of 1

TM 1 - TI process adding values

Posted: Wed Mar 15, 2017 6:51 pm
by MG03
Hello,
i am looking for a TI process to add values to elements in a cube.It is not necessary to create new elements.

Background: We would like to use an active form as an input form for budgets. In this active form there are only these elements shown, which have a value from former years (zero supression). Due to this fact we would like to offer the opportunity to add new elements by send a small value to the element, so that the element is shown in the active form.

In my mind i would like to send this value by a TI process to the element. I am interested if this idea fits or if there is another idea. Further on i am interested in an example for the code to this TI.

I am thankful for any advice.

With regards

Re: TM 1 - TI process adding values

Posted: Wed Mar 15, 2017 7:45 pm
by tomok
Why not just include the prior year and current year as columns in the active form, that way when you zero suppress the rows won't disappear. If you really don't want to see the prior year you can hide that column before publishing and it will still work to keep the zero suppression from hiding the appropriate rows.

Re: TM 1 - TI process adding values

Posted: Thu Mar 16, 2017 9:15 am
by Mark RMBC
Not exactly sure what you want to do. I am assuming you want to transfer or add budgets within the current year or something along those lines but have decided to go down the road of using the previous year’s budget (s) as the basis because you have assumed most of the adjustment would be on elements that had budgets in the past? Or maybe your users are focussed on the past and don’t care much for the present! Who can tell.

Now I assume you have the problem of wanting to add budgets to elements that have never had a budget before? In which case I don’t think Tom’s idea will suffice.

The solution depends on your requirements, as always. More information on those would be welcome.

If you are happy for the user to input budgets one element at a time (in my experience this wouldn't make the users happy!) then a simple TI with relevant parameters using Cellput would suffice. Something along the lines of:

## Assumes you have Cost Centre and Nominal account codes
if(Dimix('Cost Centre',pCC) = 0 % % Dimix('Nominal Code',pNom) = 0 );
ProcessQuit;
Endif;
## Assumes you have admin cube which holds info such as current year and version
vYear = cellgets('Admin Cube','Budget Setting Year', 'Value');
VVersion = cellgets('Admin Cube','Current Version','Value');
## Prefix p indicates parameter and Prefix v indicates variable
CellPutN(pValue, ‘Budget Cube’, pCC, pNom, vYear, vVersion, 'Budget Adjustment');


To be honest I would think about moving away from creating a view based on the previous year(s) and move to some sort of input form. The way we have done this is to create a cube for budget adjustments, which includes a row dimension and a client ID dimension. The process then loops through the rows and does cellgets and cellputs etc.

There is much more to it than this because we have an approval process and have to cater for multiple users updating at the same time etc. We also make sure robust validation is included as users can be counted on to make errors!

I am sure if you give more info then others will have their own ideas as this can be done in a number of ways!