COGNOiSe.com - The IBM Cognos Community

Planning & Consolidation => COGNOS Planning => Topic started by: andyhofer on 18 Jul 2012 04:40:58 AM

Title: Data Validation Issue
Post by: andyhofer on 18 Jul 2012 04:40:58 AM
I am trying to create a rule for a dlist.

The steps I follow are
New
Next
Rule Name "Temp"
Rule Message "Temp"
Choose cube
Choose DList
Expression "IF (Code New <> 0) THEN 0 ELSE 1"

When I press next the following error is returned
"The following section of the expression is not valid ' 0 '. Please update this section"

The "0" in the message refers to the secon "0" in the expression.

I have made sure the DList item is numeric so I can't understand why it isn't allowing me to move to the next step.

I have also tried the expression
"(Code New <> 0)"
Error returned
"The following section of the expression is not valid ' 0'. Please update this section"
and
"(Code New >0)"
"This expression is not valid. Please check the expression"


Any ideas anyone ???
Title: Re: Data Validation Issue
Post by: lav4you on 18 Jul 2012 08:01:52 AM
Hi Andyhofer,

Remove bracket IF Code New <> 0 THEN 0 ELSE 1 and try.

Regards,
Jitesh
Title: Re: Data Validation Issue
Post by: andyhofer on 18 Jul 2012 08:19:46 AM
Hi Jitesh

I'd already tried that and got the same message
"The following section of the expression is not valid ' 0 '. Please update this section"

Thanks for the suggestion.
Title: Re: Data Validation Issue
Post by: andyhofer on 18 Jul 2012 08:24:17 AM
Additional information.

It is failing on the second 0
IF Code New <> 0 THEN 0 ELSE 1

If I change the second 0 to say 12 the error returns
IF Code New <> 0 THEN 12 ELSE 1
"The following section of the expression is not valid ' 12 '. Please update this section"

Title: Re: Data Validation Issue
Post by: lav4you on 18 Jul 2012 10:01:24 AM
Hi Andy,

could you please tel me what exaclty is the business requirement and what you want to achieve with this validation.

regards,
Jitesh
Title: Re: Data Validation Issue
Post by: Danno on 30 Jul 2012 10:44:10 AM
It looks to me like it is expecting an expression for the second 0. For example, I have one rule that looks like this:

IF Code New <> 0 THEN Code New > 0 OR Code New < 0 ELSE 1

The THEN part of the statement is enforcing the business logic required here.

Perhaps that is what is needed.

Title: Re: Data Validation Issue
Post by: DanG on 27 Aug 2013 08:40:12 AM
Hi Andy,

Did you ever find a fix for this error?  I'm experiencing the same issue following an upgrade to 10.1 (windows 7).  On my 8.4 version entering a rule like you outline would work but since I've upgraded I can't enter even simple rules - I keep getting "the expression is not valid"??

Any help would be appreciated.
Thanks

24.01.2014 - **Update**  As a result of trial and error I think I've identified the cause of the problem.  In my D-List I was using the pipe symbol '|' to create blank spacer lines.  However this seems to have caused the error message above when trying to create a validation rule on the D-List.  I've no idea why this is the case but I can confirm that by removing this symbol and using a full stop instead, the validation works with no issues.  I've tried this on a few different D-List - some recent, some very old - and its the same result each time.  Don't ask me why but the pipe symbol seems to prevent Data Validation from working.  For reference I'm on 10.1 fix pack 2.