Page 1 of 1

Updating rules using a TI process

Posted: Tue Sep 27, 2016 10:51 am
by Mark RMBC
Hi,

I am building an employee budget setting model in TM1 10.1.1 and am trying to make my dimension updates as dynamic as possible.

One of the dimensions, Pay Scales, includes a picklist cube which allows users to pick a Scale Code, for example, teachers and then return only the grades within that group. i.e. a cascading picklist. This is done by referring to a subset which includes all leaf elements under the relevant Scale Code.

The logic for this is included within the rule for the picklist cube and the first few lines are shown below:

['Current Grade']=S:

If(DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code')@='SC_NJC',
'Subset:Pay Scales:SC_NJC',

IF

(DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code')@='SC_A4C',
'Subset:Pay Scales:SC_A4C',

etc,

etc,
etc))))


My question is, how do I make this dynamic if new Scale Codes are added? Can I automatically update the rule file using a TI process if new Scale Codes appear?

I was thinking that I could include this as part of the process which updates the Pay Scales dimension.

If not do I have to manually update the rules?

Re: Updating rules using a TI process

Posted: Tue Sep 27, 2016 11:12 am
by qml
Try this approach:

Code: Select all

['Current Grade'] = S: 
	IF( DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code') @<> '',
		'Subset:Pay Scales:' | DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code'),
		''
	);
It's much faster (due to having only one IF statement - and even that one is not really needed) and open to any future expansions of Scale Code.

Re: Updating rules using a TI process

Posted: Tue Sep 27, 2016 11:53 am
by Mark RMBC
Thanks for the reply.

We are currently undergoing user testing and while this is going on I am updating my documentation and looking at where I can improve the model.

I will look at your solution once this testing is over and update the thread.

Re: Updating rules using a TI process

Posted: Mon Oct 10, 2016 9:36 am
by Mark RMBC
Hi Kamil,

have updated my rule with your code and this appears to work!

So big thanks for that.

Just wish I had thought of it!

regards, Mark