Text IN on UD3 gives error

BenvanBergen
Contributor

Seems I have found a bug, not sure if this is the right place to get it solved.

We have a calculation where we use text3 on the customer, which is the country code to find the freight rate on the country customer with that name.

In the latest forecast the calculated numbers were lower than expected.

While checking there is no value calculated for customers with text IN, Indian customers.

The Cubeview I created now to check gives below message:

BenvanBergen_0-1717767873397.png

Text in the Cubeview is:

U3#39939, U3#30612, U3#Customer.base.Where(Text3 = 'IN'), I tried also Text3 startswith IN and Text3 = IN, all give the same message.

When I change to IT (for Italy), there is no error. Somehow IN is invalid for this purpose it seems.

Any idea how to solve, I can give it a different text, but would not be consistent.

 

Thanks in advance

Ben

1 ACCEPTED SOLUTION

The case will be closed by OneStream: See below the conclusions, it's not considered a bug:

i have taken your case to the wider team - the conclusion is :We always strongly recommend to always use brackets in any formulas .

As in the keywords , here are the keywords found in vb.net VB.Net - Basic Syntax (tutorialspoint.com) 

The following table lists the VB.Net reserved keywords −


AddHandler AddressOf Alias And AndAlso As Boolean
ByRef Byte ByVal Call Case Catch CBool
CByte CChar CDate CDec CDbl Char CInt
Class CLng CObj Const Continue CSByte CShort
CSng CStr CType CUInt CULng CUShort Date
Decimal Declare Default Delegate Dim DirectCast Do
Double Each Else ElseIf End End If Enum
Erase Error Event Exit False Finally For
Friend Function Get GetType GetXML Namespace Global GoTo
Handles If Implements Imports In Inherits Integer
Interface Is IsNot Let Lib Like Long
Loop Me Mod Module MustInherit MustOverride MyBase
MyClass Namespace Narrowing New Next Not Nothing
Not Inheritable Not Overridable Object Of On Operator Option
Optional Or OrElse Overloads Overridable Overrides ParamArray
Partial Private Property Protected Public RaiseEvent ReadOnly
ReDim REM Remove Handler Resume Return SByte Select
Set Shadows Shared Short Single Static Step
Stop String Structure Sub SyncLock Then Throw
To True Try TryCast TypeOf UInteger While
Widening With WithEvents WriteOnly Xor

This would mean that we do not consider this as a BUG, as we would use TEXT in brackets just to make sure it doesn't result in an intersection of the vb.net  keywords .

However if you feel that my answer is not meeting your expectations - please do raise an IdeaStream and our development team will then have a look at your request .I have attached a KB on how to do so .

View solution in original post

5 REPLIES 5

Henning
Valued Contributor

Hi, I can confirm that I am able to replicate this on my instance of OS as well (8.1). 

Try adding square brackets around it, in my case this works:

U3#Customer.base.Where(Text3 = '[IN]')

Great idea Henning! Thanks a lot.

I could also get the formula to work now like this:

api.data.calculate(Formula, UD3filter:= "U3#Customer.Base.Where(Text3 StartsWith [" & UD3Member.Name & "])")

To be on the safe side, it may be necessary to do this for all these type of formulas. No idea what other texts could cause this error.

 

Could you open a case with Support and work with them please? This product behaviour should improve, so to speak...

Thanks Jack, Case registered under: CSRC0100530 .

kind regards

Ben

The case will be closed by OneStream: See below the conclusions, it's not considered a bug:

i have taken your case to the wider team - the conclusion is :We always strongly recommend to always use brackets in any formulas .

As in the keywords , here are the keywords found in vb.net VB.Net - Basic Syntax (tutorialspoint.com) 

The following table lists the VB.Net reserved keywords −


AddHandler AddressOf Alias And AndAlso As Boolean
ByRef Byte ByVal Call Case Catch CBool
CByte CChar CDate CDec CDbl Char CInt
Class CLng CObj Const Continue CSByte CShort
CSng CStr CType CUInt CULng CUShort Date
Decimal Declare Default Delegate Dim DirectCast Do
Double Each Else ElseIf End End If Enum
Erase Error Event Exit False Finally For
Friend Function Get GetType GetXML Namespace Global GoTo
Handles If Implements Imports In Inherits Integer
Interface Is IsNot Let Lib Like Long
Loop Me Mod Module MustInherit MustOverride MyBase
MyClass Namespace Narrowing New Next Not Nothing
Not Inheritable Not Overridable Object Of On Operator Option
Optional Or OrElse Overloads Overridable Overrides ParamArray
Partial Private Property Protected Public RaiseEvent ReadOnly
ReDim REM Remove Handler Resume Return SByte Select
Set Shadows Shared Short Single Static Step
Stop String Structure Sub SyncLock Then Throw
To True Try TryCast TypeOf UInteger While
Widening With WithEvents WriteOnly Xor

This would mean that we do not consider this as a BUG, as we would use TEXT in brackets just to make sure it doesn't result in an intersection of the vb.net  keywords .

However if you feel that my answer is not meeting your expectations - please do raise an IdeaStream and our development team will then have a look at your request .I have attached a KB on how to do so .

Please sign in! BenvanBergen