Hi all!
I use TM1 9.5.2 and have the following task.
In measures dimension I have element 'UserID' that is not empty when user enters transaction code and transaction sum. This simply rule
['UserID'] =S: IF(['Code']>0 & ['Sum']>0, ATTRS('}Clients', TM1User(), '}TM1_DefaultDisplayValue'),' ');
doesn't work properly. As you can see when new user logs in the system the field 'UserID' has this user's id despite the fact whether the user edited something.
Please, help with writing a rule that would display last person who edited the transaction. Or if it is complicated the first person who entered transaction code and transaction sum.
Thanks in advance!
Help with not updating user id
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: Help with not updating user id
That's how rules work, they are dynamic. Each time you ask for the value in a rule-drive cell, the formula is evaluated and the data is returned. You can't do what you want via rule. If your user input is being done via an Excel sheet you could put a DBSS formula on the sheet to send TM1User() to this measures element but you would need some additional IF logic to control when to actually send the TM1User as the DBSS formula will send whenever you recalc.cortina wrote:As you can see when new user logs in the system the field 'UserID' has this user's id despite the fact whether the user edited something.
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Help with not updating user id
Rules aren't the right way to do this as they are dynamic and depend on who the logged-in user is. There's a really limited range of situations where using TM1User() in rules is going to be useful, or as you have found out, functional. There have been some interesting posts recently (in the last few months) on this forum on the subject which are worth reading.
For your situation, I'd advise using a DBSS formula within Excel to update the cube with the current TM1User() when the user sets new values. Or you could use an action button to run a 'post' routine that calls a TI that sets that cell. Either way, the value would persist until the next time it is changed.
For your situation, I'd advise using a DBSS formula within Excel to update the cube with the current TM1User() when the user sets new values. Or you could use an action button to run a 'post' routine that calls a TI that sets that cell. Either way, the value would persist until the next time it is changed.
Robin Mackenzie